Error when declaring - 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)
+--- Thread: Error when declaring (
/showthread.php?tid=471642)
Error when declaring -
Tagathron - 24.10.2013
I can't declare a variable with a random value as a global one?
Is this really true,or i'm doing something wrong?
Код:
new raRadioStations = random(5);
Re: Error when declaring -
Misiur - 24.10.2013
Yes, this is really true, you can't declare global variable with return from function. Simply assign the random value in main or OnGameModeInit.
Re: Error when declaring -
iJumbo - 24.10.2013
Well.. you have to create the global var
;
then in ongamemodeinit you can random it
EDIT: PWned by Misiur
Re: Error when declaring -
Tagathron - 24.10.2013
Okay it's not a problem that i can't declare it the way i did for me,just asking.
Thanks