Jump to content


How Do You Set a Global Variable?

  • Please log in to reply
2 replies to this topic

David Brasher

David Brasher


  • Members
  • PipPipPipPipPip
  • 4,910 posts
The computer does not like these lines:



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 undefined
c:\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?



    Old hand

  • Members
  • PipPipPip
  • 691 posts
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 by omega2008, 14 February 2012 - 06:48 AM.




  • Premium Member
  • 1,283 posts
Take a look at this for a longer description of the issue - EditorIDs in Papyrus


Page loaded in: 0.556 seconds