Does the server null's the values of enums autmaticaly
#4

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Yes it's always '0' or 'false' standard.
(false if it's a bool, 0 if it's a string).

I mean, if you don't give it a value, it hasn't got a value yet. You know that? And '0' is nothing
Very basic told but true

EDIT:
Didn't read it good enough, sorry. You said 'when player disconnets'
Like already told, you have to do it yourself!
See it like this:

You have an 'Money[MAX_PLAYERS]' that stores the players money into a string. The max length of the array of the 'Money' is MAX_PLAYERS (standard 500). When someone with ID 3 has 5 dollar, the 'Money' in range '3' is '5'.
When a player disconnects, the array will still exist! So when someone connects with ID 3, he'll have '5' into the 'Money', array '3'. Got it?
Yes yes, thank you! That explains the bugs in my server. LOL. Good that i thought to ask about that...
Reply


Messages In This Thread
Does the server null's the values of enums autmaticaly - by Universal - 04.01.2011, 19:32
Re: Does the server null's the values of enums autmaticaly - by __ - 04.01.2011, 19:33
Re: Does the server null's the values of enums autmaticaly - by Kwarde - 04.01.2011, 19:39
Re: Does the server null's the values of enums autmaticaly - by Universal - 04.01.2011, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)