Thread: _indexof2
View Single Post
  #11  
Old 09-20-2003, 06:37 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Still, far better 1 line as opposed to 64 virtually identical if clauses

I can create a string, call it this.values, and arrange all the characters such that their position in the string is their decimal value. However, for this to work right, indexof needs to differentiate between G and g.

Since I don't have access to v3 engine, I can't do a switch statement, which would still be quite a bit longer. So, I am stuck with
NPC Code:

if (strequals(A,#e(blah)))
{
this.decimal+=blah;
}


over and over again
__________________


Help me keep scripting
Reply With Quote