David Brasher Posted February 14, 2012 Share Posted February 14, 2012 The computer does not like these lines: AAMyGlobalVariable.SetValueInt(1) AAMyGlobalVariable.SetValue(1) AAMyGlobalVariable = 1 It always moans and whines about my global variable being undefined. It is a freaking global variable! I would think that it would by definition have to be defined. Starting 1 compile threads for 1 files...Compiling "TIF__01001D9C"...c:\games\skyrim\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__01001D9C.psc(10,0): variable AAMyGlobalVariable is undefinedc:\games\skyrim\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__01001D9C.psc(10,0): type mismatch while assigning to a none (cast missing or types unrelated)No output generated for TIF__01001D9C, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on TIF__01001D9C Is there some sneaky trick I don't know? Link to comment Share on other sites More sharing options...
SirArindel Posted February 14, 2012 Share Posted February 14, 2012 (edited) add this to your script right after your ScriptName: GlobalVariable Property AAMyGlobalVariable Auto then go to your item the script is attached and go to the script properties and select the respective global. Every item like that should be defined that way, items, spells, imagespacemodifiers etc... Hope I was helpful Edited February 14, 2012 by omega2008 Link to comment Share on other sites More sharing options...
Cipscis Posted February 14, 2012 Share Posted February 14, 2012 Take a look at this for a longer description of the issue - EditorIDs in Papyrus Cipscis Link to comment Share on other sites More sharing options...
ThraxxMedia Posted July 12, 2016 Share Posted July 12, 2016 (edited) As omega2008 already said - yes, they might be "global" variables, but still - to access them (basically, to access any kind of reference from within a script) you'll have to map them to a property respectively. Edited July 12, 2016 by ThraxxMedia Link to comment Share on other sites More sharing options...
Recommended Posts