i always got the error in the picture when that says:
[Error]: buildin_getitem: Nonexistant item 0 requested.
[Debug]: Source (NPC): FAKE_NPC (invisible/not on a map)
heres my script can somebody tell me the error thanks in advance
function script specialbox {
setarray .i[0],20727; // Itemlist in box
set .chance, rand(100);
// First item in list (20727) x 1 (1% Chance)
if (.chance == 1){
getitem .i[0],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[0])+"] from the Special Box.",0;
end;
}
// First item in list (20727) x 100 (5~10% Chance)
if (.chance <= 10 && .chance > 5){
getitem .i[1],100;
end;
}
}
Question
Sallycantdance
i always got the error in the picture when that says:
[Error]: buildin_getitem: Nonexistant item 0 requested.
[Debug]: Source (NPC): FAKE_NPC (invisible/not on a map)
heres my script can somebody tell me the error thanks in advance
function script specialbox {
setarray .i[0],20727; // Itemlist in box
set .chance, rand(100);
// First item in list (20727) x 1 (1% Chance)
if (.chance == 1){
getitem .i[0],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[0])+"] from the Special Box.",0;
end;
}
// First item in list (20727) x 100 (5~10% Chance)
if (.chance <= 10 && .chance > 5){
getitem .i[1],100;
end;
}
}
Link to comment
Share on other sites
2 answers 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.