Issue information

Issue ID
#4880
Status
Confirmed
Severity
Medium
Started
Hercules Elf Bot
Apr 26, 2011 17:35
Last Post
Hercules Elf Bot
Apr 26, 2011 17:35
Confirmation
N/A

Hercules Elf Bot - Apr 26, 2011 17:35

Originally posted by [b]~AnnieRuru~[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4880

http://www.eathena.ws/board/index.php?showtopic=270811
there are 2 errors


1.
CODE
prontera,157,186,5 script create instance 100,{
    set .@inst, instance_create("sfdfsdf", getcharid(1));
    end;
}
if the player doesn't has a party test with this npc
map-server throw this error
CODE
[Error]: map_instance_create: missing parameter.
[Error]: buildin_instance_create: Missing parameter [-2].
that's confusing error
shouldn't the error should say something like ... missing party ID or something like that ?

because script_commands.txt confused me like this
QUOTE (eAthena\doc\script_commands.txt)
*instance_create("<Instance Name>",<Party ID>,<Instance>)
that <Instance> field is not used
I tried add 3rd field for it, it says expected ','
you guys plan to do something with it ?


2.
CODE
prontera,150,180,0    script    instance creator    123,{
    setmapflag "1@tower",mf_loadevent;
    set .@instance, instance_create("1@tower", getcharid(1));
    if ( .@instance < 0 ) {
        mes "Failed to create the instance!";
        close;
    }
    if( instance_attachmap("1@tower", .@instance) == "" ) {
        instance_destroy(.@instance);
        mes "Failed to attach 1@tower as a map!";
        close;
    }
    instance_set_timeout(10,10,.@instance);
    instance_init(.@instance);
    set .@a$,has_instance("1@tower");
    set @instance,.@instance;
    warp "1@tower",100,100;
    monster .@a$,100,100,"Test Poring",1002,1,"instance creator::OnEndInstance";
    end;
OnEndInstance:
    warp "Save",0,0;
    //sleep2 1; // why do we need to put sleep2 to prevent aFree error ?
    instance_destroy(instance_id(@instance));
    end;
}

the script works
after I kill poring, the instance do destroy though
but why this error pops up ?
CODE
[Error]: Memory manager: args of aFree 0x09D24154 is invalid pointer d:\eathena\src\map\map.c line 226