Code: Select all
global int 2:STR02;
Code: Select all
global int 2:STR02;
Code: Select all
global int 2:STR02;
Code: Select all
global int 2:STR02;
Yes. Since global integers have to remain persistent from one script to another, the ACS system doesn't remember the variable name -- instead, it remembers a number. Therefore, each global integer needs its own unique number to represent it.Tormentor667 wrote:So if I use more than one global integer, I need also a unique number for each?
Yes. Again, this is how ACS keeps track of which global variable is which. The numbers must be consistent for it to work properly.Beyond, if these global integers are defined in more than one map, do the numbers have to be the same?
Code: Select all
global int 1:ThisIsGlobal;
global int 1:ThisIsGlobal2;
script 1 open
{
ThisIsGlobal = 1;
ThisIsGlobal2 = 2;
printbold(s:"ThisIsGlobal = ", i:ThisIsGlobal);
}
Wow, you're right. You'd think such basic information would already be there in some form or another...Tormentor667 wrote:I'd suggest someone puts this in the wiki, it's quite helpful for ACS noobs like me and I am sure something like this can'T be found there yet
I had to read the older ACS Primer from a totally different source to actually get the information earlier. It really wasn't available before in the Wiki. Thanks a bunch, HotWax.HotWax wrote:Wow, you're right. You'd think such basic information would already be there in some form or another...Tormentor667 wrote:I'd suggest someone puts this in the wiki, it's quite helpful for ACS noobs like me and I am sure something like this can'T be found there yet
Anyway, I added a description to the [wiki]Scope[/wiki] (Badly named?) wiki page. Hopefully that's enough to avoid further confusion.