if(src.Techniques.Find("Cyclone",Start=1,End=0))
I think I am getting an error here when I run the game. Its not a DM error, but a runtime error.
Is there anything wrong with that?
Also, how do I check the length of a list?
ID:269251
Apr 28 2005, 6:38 pm
|
|
if(src.Techniques.Find("Cyclone",Start=1,End=0)) I think I am getting an error here when I run the game. Its not a DM error, but a runtime error. Is there anything wrong with that? Also, how do I check the length of a list? |
In response to tenkuu
|
|
you where checking the list for where it was in the list
this could be > 1 and would bug out your system. a better way you could do it is to check if "text" was in ths list eg if("Cyclone" in Techniques) this would give you what you are looking for. |
length(Techniques) and Techniques.len both give the length of Techniques. length() is safer to use as whatever list you're checking doesn't have to be initialized to anything to get a length. Techniques.len would give you an error if Techniques were null, but using length(Techniques) would not.