So i thought i'd give the new versions of the script commands a try, but i'm failing miserably.
switch(instance_create("Prison Break","IM_CHAR",getcharid(0))){
case -1:
mes "^FF0000-1 Invalid Type^000000.";
close;
case -2:
mes "^FF0000-2 Char/Party/Guild not exist^000000.";
close;
case -3:
mes "^FF0000-3 Instance Already Exists?!^000000.";
close;
case -4:
mes "^FF0000-4 No Free Instances. MAX_INSTANCE?!^000000.";
close;
default:
break;
}
switch(instance_enter("Prison Break",-1,-1,getcharid(0))) {
case 3:
mes "An unknown error has occurred.";
debugmes strcharinfo(0) + " / " + instance_id() + " / FAIL CODE 3";
close;
case 2:
mes "Instance for Prison Break does not exist.";
mes "Instance has been destroyed by the Party Leader, or because of the time limit.";
debugmes strcharinfo(0) + " / " + instance_id() + " / FAIL CODE 2";
close;
case 1:
mes "Looking for a party on a single char only instance..";
debugmes strcharinfo(0) + " / " + instance_id() + " / FAIL CODE 1";
close;
case 0:
debugmes strcharinfo(0) + " / " + instance_id() + " / SUCCESS";
end;
}
This code works up until i try to enter the instance, and i get the following output from debugmes:
07:02:24:27|[Info]: [Instance] Created: Prison Break (1).
07:02:24:27|[Debug]: script debug : 2000000 110257446 : Akkarin / 0 / FAIL CODE 3
For some reason the instance isn't being attached to my char, but it should be because i'm using IM_CHAR and passing my char_id to instance_create.
The instance is setup correctly in the db (changed columns accordingly), and worked perfectly fine when i was in a party on my own before i updated to get the new script commands.
It's been a while since i've done any scripting, but i'm pretty sure this should work.. help please