Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Running a script periodically to update player statistics on a web game.

by dsheroh (Monsignor)
on Nov 02, 2010 at 09:53 UTC ( [id://868958]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://868958]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found