Seite 1 von 1

[Erl] Sudoku Mod: Fehler in der Punkteberechnung beim Reset

Verfasst: 03.05.2009 15:35
von Dungeonwatcher
Hi! 8)

Im Sudoku Mod 1.0.7a gibt es einen "Schönheitsfehler" in der Berechnung der erreichten Punkte pro Spiel, wenn das Spielfeld resettet wird. D.h. es wird einfach auf -200 Punkte gesetzt, egal wie der Punktestand vor dem Resetten ist. Um dies zu korrigieren suche in der sudoku.php nach:

Code: Alles auswählen

   sudoku_starting_data($pack,$num, SUDOKU_STARTS,'');
   $sql=" UPDATE " . SUDOKU_USERS . "
   SET points=-200,line_1='" . $lrow['line_1'] . "',line_2='" . $lrow['line_2'] . "',line_3='" . $lrow['line_3'] . "',line_4='" . $lrow['line_4'] . "',line_5='" . $lrow['line_5'] . "',line_6='" . $lrow['line_6'] . "',line_7='" . $lrow['line_7'] . "',line_8='" . $lrow['line_8'] . "',line_9='" . $lrow['line_9'] . "'
   WHERE user_id=" . $userdata['user_id'] . "
   AND game_pack=$pack
   AND game_num=$num
   ";


darin nach:

Code: Alles auswählen

SET points=-200


und ersetze dies durch:

Code: Alles auswählen

SET points=points-200


Bye

Re: [Erl] Sudoku Mod: Fehler in der Punkteberechnung beim Re

Verfasst: 28.06.2011 09:31
von Dungeonwatcher
Moin! 8)

Selbiges trifft auch auf die letzte Version 2.5.2 des Sudoku Mods für phpBB2 zu. Suche in der sudoku.php nach:

Code: Alles auswählen

   $sql=" UPDATE " . SUDOKU_USERS . "
      SET points=points-200,line_11='" . $lrow['line_11'] . "',line_12='" . $lrow['line_12'] . "',line_13='" . $lrow['line_13'] . "',line_14='" . $lrow['line_14'] . "',line_15='" . $lrow['line_15'] . "',line_16='" . $lrow['line_16'] . "',line_17='" . $lrow['line_17'] . "',line_18='" . $lrow['line_18'] . "',line_19='" . $lrow['line_19'] . "'
      WHERE user_id=" . $userdata['user_id'] . "
      AND game_type='sudoku'
      AND game_pack=$pack
      AND game_num=$num";


darin nach:

Code: Alles auswählen

SET points=points-200


Suche in der ninja.php nach:

Code: Alles auswählen

   $sql=" UPDATE " . SUDOKU_USERS . "
      SET points=-1800, line_11='" . $lrow['line_11'] . "',line_12='" . $lrow['line_12'] . "',line_13='" . $lrow['line_13'] . "',line_14='" . $lrow['line_14'] . "',line_15='" . $lrow['line_15'] . "',line_16='" . $lrow['line_16'] . "',line_17='" . $lrow['line_17'] . "',line_18='" . $lrow['line_18'] . "',line_19='" . $lrow['line_19'] . "',line_21='" . $lrow['line_21'] . "',line_22='" . $lrow['line_22'] . "',line_23='" . $lrow['line_23'] . "',line_24='" . $lrow['line_24'] . "',line_25='" . $lrow['line_25'] . "',line_26='" . $lrow['line_26'] . "',line_27='" . $lrow['line_27'] . "',line_28='" . $lrow['line_28'] . "',line_29='" . $lrow['line_29'] . "',line_32='" . $lrow['line_32'] . "',line_34='" . $lrow['line_34'] . "',line_35='" . $lrow['line_35'] . "',line_36='" . $lrow['line_36'] . "',line_38='" . $lrow['line_38'] . "',line_41='" . $lrow['line_41'] . "',line_42='" . $lrow['line_42'] . "',line_43='" . $lrow['line_43'] . "',line_44='" . $lrow['line_44'] . "',line_45='" . $lrow['line_45'] . "',line_46='" . $lrow['line_46'] . "',line_47='" . $lrow['line_47'] . "',line_48='" . $lrow['line_48'] . "',line_49='" . $lrow['line_49'] . "',line_51='" . $lrow['line_51'] . "',line_52='" . $lrow['line_52'] . "',line_53='" . $lrow['line_53'] . "',line_54='" . $lrow['line_54'] . "',line_55='" . $lrow['line_55'] . "',line_56='" . $lrow['line_56'] . "',line_57='" . $lrow['line_57'] . "',line_58='" . $lrow['line_58'] . "',line_59='" . $lrow['line_59'] . "',line_61='" . $lrow['line_61'] . "',line_62='" . $lrow['line_62'] . "',line_63='" . $lrow['line_63'] . "',line_64='" . $lrow['line_64'] . "',line_65='" . $lrow['line_65'] . "',line_66='" . $lrow['line_66'] . "',line_68='" . $lrow['line_68'] . "',line_71='" . $lrow['line_71'] . "',line_72='" . $lrow['line_72'] . "',line_74='" . $lrow['line_74'] . "',line_75='" . $lrow['line_75'] . "',line_76='" . $lrow['line_76'] . "',line_77='" . $lrow['line_77'] . "',line_78='" . $lrow['line_78'] . "',line_82='" . $lrow['line_82'] . "',line_83='" . $lrow['line_83'] . "',line_84='" . $lrow['line_84'] . "',line_85='" . $lrow['line_85'] . "',line_86='" . $lrow['line_86'] . "',line_88='" . $lrow['line_88'] . "',line_89='" . $lrow['line_89'] . "',line_92='" . $lrow['line_92'] . "',line_94='" . $lrow['line_94'] . "',line_95='" . $lrow['line_95'] . "',line_96='" . $lrow['line_96'] . "',line_97='" . $lrow['line_97'] . "',line_98='" . $lrow['line_98'] . "',line_99='" . $lrow['line_99'] . "'
      WHERE user_id=" . $userdata['user_id'] . "
      AND game_pack=$pack
      AND game_num=$num
      AND game_type='ninja'";


darim nach:

Code: Alles auswählen

SET points=-1800


ersetze es durch

Code: Alles auswählen

SET points=points-1800


Suche in der samurai.php nach:

Code: Alles auswählen

   $sql=" UPDATE " . SUDOKU_USERS . "
      SET points=-1000, line_11='" . $lrow['line_11'] . "',line_12='" . $lrow['line_12'] . "',line_13='" . $lrow['line_13'] . "',line_14='" . $lrow['line_14'] . "',line_15='" . $lrow['line_15'] . "',line_16='" . $lrow['line_16'] . "',line_17='" . $lrow['line_17'] . "',line_18='" . $lrow['line_18'] . "',line_19='" . $lrow['line_19'] . "',line_21='" . $lrow['line_21'] . "',line_22='" . $lrow['line_22'] . "',line_23='" . $lrow['line_23'] . "',line_24='" . $lrow['line_24'] . "',line_25='" . $lrow['line_25'] . "',line_26='" . $lrow['line_26'] . "',line_27='" . $lrow['line_27'] . "',line_28='" . $lrow['line_28'] . "',line_29='" . $lrow['line_29'] . "',line_32='" . $lrow['line_32'] . "',line_34='" . $lrow['line_34'] . "',line_35='" . $lrow['line_35'] . "',line_36='" . $lrow['line_36'] . "',line_38='" . $lrow['line_38'] . "',line_41='" . $lrow['line_41'] . "',line_42='" . $lrow['line_42'] . "',line_43='" . $lrow['line_43'] . "',line_44='" . $lrow['line_44'] . "',line_45='" . $lrow['line_45'] . "',line_46='" . $lrow['line_46'] . "',line_47='" . $lrow['line_47'] . "',line_48='" . $lrow['line_48'] . "',line_49='" . $lrow['line_49'] . "',line_51='" . $lrow['line_51'] . "',line_52='" . $lrow['line_52'] . "',line_53='" . $lrow['line_53'] . "',line_54='" . $lrow['line_54'] . "',line_55='" . $lrow['line_55'] . "',line_56='" . $lrow['line_56'] . "',line_57='" . $lrow['line_57'] . "',line_58='" . $lrow['line_58'] . "',line_59='" . $lrow['line_59'] . "'
      WHERE user_id=" . $userdata['user_id'] . "
      AND game_pack=$pack
      AND game_num=$num
      AND game_type='samurai'";


darim nach:

Code: Alles auswählen

SET points=-1000


ersetze es durch:

Code: Alles auswählen

SET points=points-1000


Bye]