SA-MP Forums Archive
[HELP] GetVariable(string[]) - 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: [HELP] GetVariable(string[]) (/showthread.php?tid=260487)



[HELP] GetVariable(string[]) - hayander - 09.06.2011

Basically, I want to be able to do the following:

Код:
new test =124;

GetVariable(string[]) {
    return string;  // If string == "test", then I want this to return the value of the variable named "test" (i.e.,124)
}


new second =GetVariable("test"); // Where the 'second' variable now == 124.
Is this at all possible? And if so, how would it be achieved?


Re: [HELP] GetVariable(string[]) - hayander - 09.06.2011

Thanks a bunch for that, ******. Works a treat.