Posts: 2,220
Threads: 154
Joined: Jul 2009
Reputation:
0
Hello,
My question is simple: what does that static do? What is different from a simple new ?
Regards, Jochem
Posts: 2,220
Threads: 154
Joined: Jul 2009
Reputation:
0
Actually it doesn't explain at all what just a simple static is.
Posts: 6,129
Threads: 36
Joined: Jan 2009
https://sampwiki.blast.hk/wiki/Keywords:Initialisers#static
Quote:
A static variable is like a global new variable but with a more limited scope. When static is used globally the resulting created variables are limited to only the section in which they were created.
|
Posts: 2,220
Threads: 154
Joined: Jul 2009
Reputation:
0
I still don't get it.. How bad of me I dont know this basic thing.
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Wiki: Global static variables are like normal globals but can only be used in the file in which they are declared
Posts: 654
Threads: 20
Joined: Jul 2009
Reputation:
0
They're only really useful if you have more than one file in your sourcecode. If you plonk your gamemode all into the one file like most people then you don't have to worry about them.