SA-MP Forums Archive
Variables Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Variables Problem (/showthread.php?tid=195834)



Variables Problem - Jacob_Venturas - 03.12.2010

So I have a variable, a global variable to be precise, and I am planing on using this variable in multiple callbacks and so on. I first of all have one local variable in a dialog response callback, and I want to be able to store that local variable into my global variable, so I can use that variable everywhere in the script. Here is what I am having troubles with:
pawn Код:
new DivisionID[MAX_PLAYERS]; //this is global


if(dialogid == 10)
{
new Player;
Player = DivisionID;
}
As you can see, Player = DivisionID, it gives me a lot of array errors. Please help.


Re: Variables Problem - Retardedwolf - 03.12.2010

pawn Код:
DivisionID [ playerid ] = Player;



Re: Variables Problem - Jacob_Venturas - 03.12.2010

Thanks man.