View Single Post
  #1  
Old 04-16-2008, 02:55 AM
Frankie Frankie is offline
xChugxLifex
Frankie's Avatar
Join Date: Feb 2008
Location: New York
Posts: 1,610
Frankie is a jewel in the roughFrankie is a jewel in the rough
Send a message via AIM to Frankie Send a message via MSN to Frankie
getting an index

I'm having a little trouble here.

I'm making a bounty system, the account and the amount of money for that bounty will be placed in an array like this:

this.bounty = {{"Frankie", 2000}, {"TSAdmin", 1500}};

when a player dies I want to check if they are in the list, but I can't do that because I'm having trouble checking the index.

function onCreated()
{
this.array = {{"Frankie", 2000}, {"TSAdmin", 1500}};
this.getIndex = this.array.index("Frankie");
sendtorc(this.getIndex);
}

returns -1.

I need it to return 0 this way I can do:

this.moneyAmount = this.array[this.getIndex][1];

there's something I'm missing but TSA and I can't figure it out.
__________________
*Sum41Freeeeek
*Frankie
Reply With Quote