HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Refer to array using custom script?

09-23-2006, 04:27 PM#1
zeroXD
How (if it is possible) can i refer to an array using a custom script?
Excample:
Trigger:
Custom Script - call RemoveLocation(udg_Point[udg_Integer])

What i want, is using a integer var to destroy a point, cause in this case its not a temporary point, but a point that is used in a periodic trigger witch runs every 0.02 second over a 10 second period.

thanks
09-23-2006, 04:29 PM#2
Captain Griffen
I don't see what the problem is...
09-23-2006, 04:30 PM#3
TaintedReality
Does that not work? That is how you use arrays in jass.
09-23-2006, 05:10 PM#4
zeroXD
it donw work... try in GUI and you see
09-23-2006, 05:16 PM#5
Captain Griffen
Probably because you haven't declared the variables.
09-24-2006, 09:41 AM#6
zeroXD
Quote:
Originally Posted by Captain Griffen
Probably because you haven't declared the variables.
I have, and btw im getting an error that its wrong when i save the map.
09-24-2006, 10:14 AM#7
Thunder_Eye
what's the name of the variables? (in the variable editor)
09-24-2006, 11:04 AM#8
zeroXD
"CastPoint" with a 12 sized array, and "PlayerInteger"
The one i posted up there was just an excample.

In the editor it is this:
Trigger:
Custom Script - call RemoveLocation(udg_CastPoint[udg_PlayerInteger])
09-24-2006, 11:05 AM#9
Thunder_Eye
rename them to "Point" and "Integer" then and it'll work
edit: hmm ok, must be the names thou as there is not anything else wrong with that line
09-24-2006, 11:09 AM#10
zeroXD
Dont work... still the same error.
09-24-2006, 11:23 AM#11
blu_da_noob
What is the actual error message?
09-24-2006, 11:33 AM#12
zeroXD
dah, forget it, i managed to make it work, i had something wrong with the integer var name. Now it works =)
Needed to know cause im trying to fix all the leaks in my spell pack. btw blu, ive updated it.