Info of local variable and global
#1

Hey guys. I know this isn't a great issue but yes if you use them in wrong way it may cause a big problem.
So i wanted to know that ,

If I use something like the below codes, first let's see the code.

Код:
new example[MAX_PLAYERS];
In this codes the example value of each player will be stored for every single player right?
Or it will be stored for all the players in-game?
I mean if i type
Код:
//In some context cmd
example[playerid] = 10;
Here will it be saved for only the player who used the cmd? Or for all?

And the second question is for the same purpose :
Код:
new example;
Now the example value what ever is stored will be for all?

Thank you. Please guide me here.
Reply


Messages In This Thread
Info of local variable and global - by fuckingcruse - 31.05.2016, 06:47
Re: Info of local variable and global - by saffierr - 31.05.2016, 07:17
Re: Info of local variable and global - by Dayrion - 31.05.2016, 08:50
Re: Info of local variable and global - by SyS - 31.05.2016, 11:25
Re: Info of local variable and global - by saffierr - 31.05.2016, 11:28

Forum Jump:


Users browsing this thread: 1 Guest(s)