Good day, in my script i encounter this error. I can't find a way to fix.
- script Gold_Room_Max_Account -1,{
OnPCLoadMapEvent:
if(getgmlevel() >= 99){
end;
}
set .@charmap$, strcharinfo(3);
if(!compare(.tmp$, .@charmap$)) end;
set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `ragnarok_accounts`.`login` WHERE `last_ip` = (SELECT `last_ip` FROM `ragnarok_accounts`.`login` WHERE `account_id` = "+getcharid(3)+")) AND `online` <> 0;",.@a);
for(set(.@d,0); .@d < .@len; set(.@d, .@d+1)) {
if(!getmapxy(.@map$, .@x, .@y, BL_PC, rid2name(.@a[.@d])) && .@charmap$ == .@map$)
set .@c, .@c + 1;
}
if(.@c > .limitacc ) {
dispbottom "Maximum of 2 accounts are allowed in the Gold Room at a time!";
warp "thana_town", 100, 100;
}
end;
OnInit:
set .limitacc, 2;
setarray .maps$, "rockrdg1";
set .lens, getarraysize(.maps$);
for(set(.a, 0); .a < .lens; set(.a, .a+1)) {
setmapflag .maps$[.a], mf_loadevent;
set .tmp$, .tmp$ + .maps$[.a] + ",";
}
}