I'm using a instance which worked on another emulator, but when I run it on this one I'm getting the following error:
[Warning]: Unexpected type for argument 1. Expected string.
[Debug]: Data: number value=-1
[Debug]: Function: instance_npcname
[Debug]: Source (NPC): Entrance#man1 at man_lob (99,98)
[Error]: script:instance_npcname: invalid instance NPC (instance_id: -1, NPC nam
e: "-1".)
[Debug]: Source (NPC): Entrance#man1 at man_lob (99,98)
This is the script that's causing trouble. It's the warper, does anyone know where it went wrong?;
[Warning]: Unexpected type for argument 1. Expected string.
[Debug]: Data: number value=-1
[Debug]: Function: instance_npcname
[Debug]: Source (NPC): Entrance#man1 at man_lob (99,98)
[Error]: script:instance_npcname: invalid instance NPC (instance_id: -1, NPC nam
e: "-1".)
[Debug]: Source (NPC): Entrance#man1 at man_lob (99,98)
This is the script that's causing trouble. It's the warper, does anyone know where it went wrong?;
Code:
man_lob,99,98,0 script Entrance#man1 2_M_THIEFMASTER,{
set .@pname$,strcharinfo(0);
set .@guid,getcharid(2);
dispbottom "Name: " + instance_npcname(has_instance2("1@manp"));
if ((has_instance2("1@manp") >= 0) && (has_instance2("1@manp") != "0")) {
set .@party_id,getcharid(1);
if (.@party_id == 0) {
dispbottom "Error! Player is currently not in a party!";
end;
}
getpartymember(.@party_id);
set .@partymembercount,$@partymembercount;
if (compare("BB solo",instance_npcname(has_instance2("1@manp")))) {
if ((getcharid(0) != getpartyleader(.@party_id,2)) || (.@partymembercount != 1)) {
dispbottom "Error! Only the party leader can enter the solo room with nobody else in the party.";
end;
}
}
if ((.@guid != 0) && ((.@guid == $bbguild[0]) || (.@guid == $bbguild[1]) || (.@guid == $bbguild[2]))) {
mes "You have currently booked a guild room as well as a "+(compare("BB solo",instance_npcname(has_instance2("1@manp")))?"solo":"party")+" room, which one do you want to enter?";
if (select("Guild room:"+(compare("BB solo",instance_npcname(has_instance2("1@manp")))?"Solo":"Party")+" room") == 1) goto GuildRoom;
}
set .@pname$,strcharinfo(0);
message .@pname$,.@pname$+" : I feel a bit dizzy ...";
sleep2 500;
switch (rand(4)) {
case 0:
warp "1@manp",50,10;
break;
case 1:
warp "1@manp",10,50;
break;
case 2:
warp "1@manp",50,89;
break;
case 3:
warp "1@manp",89,50;
break;
}
} else if ((.@guid != 0) && ((.@guid == $bbguild[0]) || (.@guid == $bbguild[1]) || (.@guid == $bbguild[2]))) {
GuildRoom:
set .@pname$,strcharinfo(0);
message .@pname$,.@pname$+" : I feel a bit dizzy ...";
sleep2 500;
if (.@guid == $bbguild[0])
set .@gnui,1;
else if (.@guid == $bbguild[1])
set .@gnui,2;
else if (.@guid == $bbguild[2])
set .@gnui,3;
switch (rand(4)) {
case 0:
warp "man_gu"+.@gnui,50,10;
break;
case 1:
warp "man_gu"+.@gnui,10,50;
break;
case 2:
warp "man_gu"+.@gnui,50,89;
break;
case 3:
warp "man_gu"+.@gnui,89,50;
break;
}
} else {
message .@pname$,.@pname$+" : There are cables connected to that tree. Weird ...";
}
end;
}
1@manp,50,6,0 warp manp_01 1,1,man_lob,99,93
1@manp,6,50,0 warp manp_02 1,1,man_lob,99,93
1@manp,50,93,0 warp manp_03 1,1,man_lob,99,93
1@manp,93,50,0 warp manp_04 1,1,man_lob,99,93
man_pub,40,37,0 warp manp_06 1,1,man_lob,144,98
man_pub,32,206,0 warp manp_07 1,1,man_lob,144,98
man_pub,203,207,0 warp manp_08 1,1,man_lob,144,98
man_pub,191,40,0 warp manp_09 1,1,man_lob,144,98