Stupid question - 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: Stupid question (
/showthread.php?tid=447633)
Stupid question -
NeroX98 - 30.06.2013
Hi
Is it normal to have 228 player variables or this is world record

I have Roleplay gamemode
Respuesta: Stupid question -
JustBored - 30.06.2013
You wont have a world record -.-! if i want i can make a variable for whatever.
Re: Stupid question -
RedFusion - 30.06.2013
I guess roleplay scripts require alot of variables, nothing unusual
Re: Stupid question -
Alternative112 - 01.07.2013
Yes most RP scripts have LOTS of variables and arrays of variables and it's normal to use a lot of memory. However you should still be wise as to what type of variable you use and which ones you actually need. There's no need to store a variable that simply adds or does a small equation to 2 existing variables when you could just make a function to get the same result, especially if it's not used much. Using boolean-type variables instead of normal int ones for simple yes-or-no information would help, too.
Re: Stupid question -
Goldilox - 01.07.2013
I've a question regarding those variables. (too lazy to make another topic)
Does it cause the server lag if we have lots of variables?
Respuesta: Stupid question -
JustBored - 01.07.2013
No they dont, if you dont use them just create them they wont lag the server.