Variables – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
Global variables: my advice ... declare them all in init.sqf first!!!!!! Sorry for the yelling but this really really threw me. Global variables held different values when I was just declaring them within scopes of other spawned scripts, etc. and it wasn't obvious what was going on. I'm surprised this isn't even mentioned by anyone.. or is it? --[[User:Doolittle|Doolittle]] 19:49, 12 September 2007 (CEST)
Global variables: my advice ... declare them all in init.sqf first!!!!!! Sorry for the yelling but this really really threw me. Global variables held different values when I was just declaring them within scopes of other spawned scripts, etc. and it wasn't obvious what was going on. I'm surprised this isn't even mentioned by anyone.. or is it? --[[User:Doolittle|Doolittle]] 19:49, 12 September 2007 (CEST)


Did you read this part: [[Variables#Scope]]? ++[[User:Str|Str]] 19:58, 12 September 2007 (CEST)
:Did you read this part: [[Variables#Scope]]? ++[[User:Str|Str]] 19:58, 12 September 2007 (CEST)
 
::Yes I did. That's what threw me. "scope does not apply to global variables"... my experience shows it does. --[[User:Doolittle|Doolittle]] 23:24, 12 September 2007 (CEST)

Revision as of 22:24, 12 September 2007

Global variables: my advice ... declare them all in init.sqf first!!!!!! Sorry for the yelling but this really really threw me. Global variables held different values when I was just declaring them within scopes of other spawned scripts, etc. and it wasn't obvious what was going on. I'm surprised this isn't even mentioned by anyone.. or is it? --Doolittle 19:49, 12 September 2007 (CEST)

Did you read this part: Variables#Scope? ++Str 19:58, 12 September 2007 (CEST)
Yes I did. That's what threw me. "scope does not apply to global variables"... my experience shows it does. --Doolittle 23:24, 12 September 2007 (CEST)