Re_Boot Posted March 22, 2008 Report Share Posted March 22, 2008 Es nez, bet manliekas ka shi problema ir nopietna un es nevaru izshtukot kapec mans skripts nedarbojas pareizi <?php if ($infos["form"] > '1') { $multiplierr = 1 / 5; $frequencyy = 40 * $multiplierr; $incrementt = 5 * $multiplierr; $current_timee = time(); // get the current server time in second $last_update_timee = mysql_result(mysql_query("SELECT ttime FROM users"), 0); $time_differencee = $current_timee - $last_update_timee; $hours_passedd = $time_differencee / $frequencyy; $full_hours_passedd = floor($hours_passedd); $remaining_secondss = $time_differencee % $frequencyy; if($full_hours_passedd > 0){ $new_update_timee = $current_timee + $remaining_secondss; $hp_increasee = $full_hours_passedd * $incrementt; mysql_query("UPDATE `users` SET `energy` = CASE WHEN `energy` + $hp_increasee <= `energymax` THEN `energy` - $hp_increasee ELSE `energymax` END WHERE `energymax` < `energy`"); mysql_query("UPDATE `users` SET form`='1' END WHERE `energy` > `10`"); mysql_query("UPDATE users SET ttime = $new_update_timee"); } } ?> Sheit ir problema! Karo4 shim skriptam ir janjem visiem useriem kam ir FORM lielaks par 1, ir janjem energjija nost, un tik talu viss butu pareizi vinjs njem energjiju nost liidz apstajas pie 10, a pie 10 vinjam butu japarliek form atpakal uz 1, bet vinjsh ta vienkarshi iestregst! Ludzu palidzat! Link to comment Share on other sites More sharing options...
Aleksejs Posted March 22, 2008 Report Share Posted March 22, 2008 Varbūt tādēļ, ka skaitļus nemēdz likt pēdiņās... Link to comment Share on other sites More sharing options...
Kristabs Posted March 23, 2008 Report Share Posted March 23, 2008 Mēdz, tikai pareizajās '' nevis tilde (laikam tā viņu sauc) - `` Link to comment Share on other sites More sharing options...
Aleksejs Posted March 23, 2008 Report Share Posted March 23, 2008 Nē, tilde ir ~ ` - angliski ir "grave accent" jeb "back quote", jeb "back tick" Link to comment Share on other sites More sharing options...
Mikijs Posted March 23, 2008 Report Share Posted March 23, 2008 mjam.. =/ man itka strada ja ir '1' bet =/ ok.. itka skaitlus nelieku :D ne ' ne " un :P ari ne tildee... Link to comment Share on other sites More sharing options...
Recommended Posts