I'm trying to add/check the player ip into an array, but my script is not behaving as it is intended.
The issue here is that, its not running the for loop, tried to add some debug messages to make sure of it.
OnInit:
setarray .@iparr$[0],"null";
end;
OnPCLoginEvent:
query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'",@pip$);
set .@arrsize,getarraysize(.@iparr$);
for(set .@i,0; .@i < .@arrsize; set .@i,.@i+1) {
//do things
// for debugging purposes
dispbottom "index "+.@i+" with value of "+@pip$+"";
}
// for debugging purposes
dispbottom "pc login loop done";
end;
Someone please check this for me, this is kind of frustrating, (i always was)
Is it because of my variable types? ( i dont think so) Is this a Bug or something else?
Edited: found out that the getarraysize() function has something to do with this, i'm not sure why, ill just find other way, instead of using getarraysize().
Question
benching
I'm trying to add/check the player ip into an array,
but my script is not behaving as it is intended.
The issue here is that, its not running the for loop,
tried to add some debug messages to make sure of it.
Someone please check this for me,
Edited by benchingthis is kind of frustrating, (i always was)
Is it because of my variable types? ( i dont think so)
Is this a Bug or something else?
Edited:
found out that the getarraysize() function has something to do with this,
i'm not sure why, ill just find other way, instead of using getarraysize().
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.