in reply to Re: Running a script periodically to update player statistics on a web game.
in thread Running a script periodically to update player statistics on a web game.

Unrelated but the $cou+=0 looks a bit dodgy: ++$cou perhaps. I could be wrong as I've no idea what $cou refers to.
Dodgy indeed. He appears to be trying to build an infinite loop to keep the game running forever, but he hasn't yet discovered the
while (1) { ... }
construct that most of us use. $cou is presumably a generic counter and I'm guessing the +=0 is intentional so that the loop will never terminate.

Replies are listed 'Best First'.
Re^3: Running a script periodically to update player statistics on a web game.
by kcott (Archbishop) on Nov 02, 2010 at 10:06 UTC

    I wondered if it was intended as an infinite loop but AM also seems to want to stop it after 100 iterations.

    I shall wait patiently for AM to enlighten us. :-)

    -- Ken

      It was intended as an infinite loop with $cou being a counter. Using a for loop like that is a bad habit from when I started programming.

      From what you guys said I think I will use cron jobs for my updates since they will affect all players. Thanks for the help.