ar_BadNumericIndex

Post » Fri May 27, 2011 3:44 pm

I'm not sure if I'm using this correctly. In this little bit:

if eval spellarray[index] == ar_BadNumericIndex
;do stuff
endif

I know for a fact 'index' in not a valid key, but the 'do stuff' never triggers. Am I using this right?
User avatar
Lily Evans
 
Posts: 3401
Joined: Thu Aug 31, 2006 11:10 am

Post » Fri May 27, 2011 3:24 pm

Anyone?
User avatar
Javaun Thompson
 
Posts: 3397
Joined: Fri Sep 21, 2007 10:28 am

Post » Fri May 27, 2011 12:18 pm

I know for a fact 'index' in not a valid key,

That's likely the problem. If the script can't process the 'index' part, it won't be able to progress to the 'do stuff' part.
User avatar
Felix Walde
 
Posts: 3333
Joined: Sat Jun 02, 2007 4:50 pm

Post » Fri May 27, 2011 3:49 am

Use testexpr instead of eval. ar_BadNumericIndex is used to compare array keys, not elements.
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am


Return to IV - Oblivion