Originally posted by [b]Masao[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4755
Hi,
i just wanted to make a script on my Server which is based on the Skulltulas Idea from Zelda OoT, so when a player kills one of those skulltulas or Araneas how i call them on my server, it should store the number of the skulltula in an permanent char variable so he can't kill the same skulltula again.
Now when i try to kill one i get this error message:
[Error]: script:getelementofarray: illegal scope
[Debug]: Data: variable name='araneas'
[Debug]: Source (NPC): skulltulas (invisible/not on a map)
The script looks like this:
QUOTE
OnS1Dead:
for(set .@i,1; .@i <= ak; set .@i,.@i+1){
if(araneas[.@i] == 1){
dispbottom "You've already killed this Aranea!";
monster "pay_fild04",0,0,"Aranea",2573,1,"skulltulas::OnS1Dead";
end;
}
}
set arkp,arkp+1;
set ak,ak+1;
set araneas[ak],1;
dispbottom "You've killed now "+arkp+" Araneas!";
monster "pay_fild04",0,0,"Aranea",2573,1,"skulltulas::OnS1Dead";
end;
So, i'm not sure if this is a bug, but shouldn't it be possible to make an scope with an perm. char variable?
Regards
Masao
This post has been edited by Masao: Feb 9 2011, 12:38 PM