viewing paste get array element position | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 
prontera,155,181,5  script  Sample#array    757,{
.@cid = getcharid(0);
for( .@i = 0 ; .@i < .char_id_size; .@i++ )
    if( .@cid = .char_id[.@i] ){
        mes "Your ID is number "+( .@i+1 );
        close;
    }
mes "Your ID not found in Array.";
close;
 
OnInit:
    setarray .char_id,
        15000,
        15001,
        15002,
        15003
    .char_id_size = getarraysize( .account_id );
    end;
}
Viewed 1200 times, submitted by Emistry.