Jump to content

Array Properties Revisted


Spinner385

Recommended Posts

EDIT: Nevermind got it. Had to declare initial variables so it knew what size array to use.

 

So I couldn't get array properties to work before and gave up on them. For what I'm writing I really need them to work. Can someone tell me what I'm missing here?

 

Scriptname TestScript extends ObjectReference  

Int[] Property ArrayTest Auto

Event OnPlayerLoadGame()
ArrayTest[0] = 100
ArrayTest[1] = 101
ArrayTest[2] = 102
utility.wait(1)
Debug.messagebox(ArrayTest[0])
utility.wait(1)
Debug.messagebox(ArrayTest[1])
utility.wait(1)
Debug.messagebox(ArrayTest[2])
utility.wait(1)
EndEvent

 

It returns three boxes displaying 102

Edited by Spinner385
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...