ID:139986
 
Code:
var
list/EN=list(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)


Problem description:
Every single proc and obj in the game that is using this list is getting this error on Dream Daemon: List Index out of Bounds. What does this mean? Here's an example of an obj using the list:

obj
Enter
Click()
usr << 'click1.wav')
usr.loc = locate_tag("MAP1")
HERE--->*******if(!EN[10])*******<---HERE
return

Works perfectly for me except you have 2 extra ")" in the code you gave. Also what is locate_tag? Are you meaning locate(tag)? I'm not an expert, that's just what I noticed.
var
//Took out extra ")"
list/EN=list(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
obj
Enter
Click()
//took out extra ")"
usr << 'click1.wav'
//Changed to correct??
usr.loc = locate("MAP1")
//HERE--->*******if(!EN[10])*******<---HERE
//I don't believe this is correct DM Syntax =P
if(!EN[10])
return
In response to Eragor222
That Parentheses was an accident. But, yeah, I don't see an issue, either.
In response to Xorbah
Did you even attempt to compile?
In response to Eragor222
Uh, yeah? I do recall saying it only appears on the Dream Daemon hosting program. And the procs and objs with the list residing in them do not work.
In response to Xorbah
I was surprised that you had so many errors and still managed to get it compiled that's why I asked.
In response to Eragor222
Ugh...it's not errors, well it is, but none that the compiler picked up. The DD client is saying that the list index is out of bounds.
In response to Xorbah
That's odd that your compiler didn't pick it up. The version I posted works without error in the test world I made.
In response to Eragor222
The error is quite obvious
When you use associative lists, you pick a value on a list and link it to something.
In your case, you are trying to get the "link" from "10".
So when you call list["10"], it will pick the value "10" in the list and return its link.
The problem here is simply that you dont have the "10" value in your list

Also, I dont think you know how to use associative lists at all
In response to Abrax
Oh wow, I didn't even think about that. I was thinking about it in terms of calling the index of the list. I've used associative lists in many projects I just got a little confused on how the calls are performed.