OnPlayerText question
#5

Quote:
Originally Posted by iggy1
View Post
You had no opening brace after the 'for' loop.
Also loops like that should be <= MAX_PLAYERS. Because if your sever is full the loop will miss a player.
Newly declared variables have a value of 0, which is a valid player slot. Using <= in loops is pretty much script suicide, just wait until you use the loop to modify an array and watch as your server kills itself (the loop will try to write to the 11th slot of var[10], for example).

i < MAX_PLAYERS, remember it...
Reply


Messages In This Thread
OnPlayerText question - by Pawno_Master - 04.09.2010, 10:15
Re: OnPlayerText question - by iggy1 - 04.09.2010, 10:20
Re: OnPlayerText question - by Pawno_Master - 04.09.2010, 10:28
Re: OnPlayerText question - by iggy1 - 04.09.2010, 10:29
Re: OnPlayerText question - by General Abe - 04.09.2010, 10:30
Re: OnPlayerText question - by iggy1 - 04.09.2010, 10:37
Re: OnPlayerText question - by Pawno_Master - 04.09.2010, 15:33
Re: OnPlayerText question - by General Abe - 04.09.2010, 17:45

Forum Jump:


Users browsing this thread: 2 Guest(s)