Instances crash

Kubix

New member
Messages
150
Points
0
Location
Ukraine
Github
kubixservice
Emulator
Hi there.

I don't know what to do x.x

After warp to instance - client crashing.

Script:

instances,107,138,7 script Test PORTAL,{

.@md_name$ = "Test";
.@party = getcharid(1);
.@p_name$ = getpartyname(.@party);


if( !instance_check_party(.@party, 1) )
{
mes .@md_name$;
mes "Fail: 1";
close;
}

switch(select("Generate:Enter:Destroy"))
{
case 1:
.@instance = instance_create(.@md_name$, .@party);
if(.@instance < 0)
{
mes "Fail.";
close;
}

instance_attachmap("1@elements", .@instance);
instance_set_timeout 14400, 300, .@instance;
instance_init(.@instance);
instance_attach .@instance;
warp instance_mapname("1@elements", .@instance), 86, 74;
end;

case 2:
if (has_instance("1@elements") != "")
warp instance_mapname("1@elements", .@instance), 86, 74;
else end;

case 3:
instance_destroy(.@instance);
close;
}

}


resnametable:

[email protected]#[email protected]#
[email protected]#[email protected]#
[email protected]#[email protected]#
유저인터페이스\map\[email protected]#유저인터페이스\map\[email protected]#

Map added to mapindex, maps.conf, and my grf.

when i use @warp 1@elements - OK.

Also i try :

warp has_instance("1@elements", .@instance), 86, 74;
warp "1@elements", 86, 74;
 
help xD

 
Iirc for instances you can't use such long map names, limit is like 6 or 7 characters, I don't quite remember.

Client is crashing because your instance map name gets cut off, and is sent to client like "1@eleme" or something. Try to make map name shorter (4~5 characters after "@", 4 just to be sure) or use map name emulation (you'd still need to change map name client-side, but that'll be easy since you already set resnametable entries.)

 
yeah, what i do is just use replicate the map via instance system itself, so no need to edit client side, unless you really have custom map, then do what Garr said, decrease the number of letter at mapname

yeah, what i do is just use replicate the map via instance system itself, so no need to edit client side, unless you really have custom map, then do what Garr said, decrease the number of letter at mapname

 
Without adding things to resnametable.txt @@Samuel?
Yes, via instance_attachmap command right?

instance_attachmap("prontera", .@instance_id,1,"via"); "via" will be the replicated map of prontera. This one is useful when you're just going to clone existing maps.

But when using custom map, you still need to add clientside things.

But you could still use the above method to replicate custom maps,

instance_attachmap("1@elements", .@instance_id,1,"blah"+.@customarg);
default_biggrin.png


 
Garr, on 07 Feb 2016 - 21:45, said:

Garr, on 07 Feb 2016 - 21:45, said:

Iirc for instances you can't use such long map names, limit is like 6 or 7 characters, I don't quite remember.

Client is crashing because your instance map name gets cut off, and is sent to client like "1@eleme" or something. Try to make map name shorter (4~5 characters after "@", 4 just to be sure) or use map name emulation (you'd still need to change map name client-side, but that'll be easy since you already set resnametable entries.)
16-4(.gat) -3(0011@elemen) -1(\0) = 8
 
Last edited by a moderator:
How come when I use this method @@Samuel the first player that warps to custom map is fine, but then 2nd or 3rd character warps and they are frozen? they warp to cells you can walk on ._.

Code:
[Error]: instance_add_map: trying to create instanced map with existent nam
gef'
[Error]: buildin_instance_attachmap: instance creation failed (geffen): -2
 
@@Aeromesi

I think this should be in other topic, but how did you create the instance attach?

here's mine:

Code:
if ( ( @ins = instance_create( "Custom Dungeon", getcharid(1), IOT_PARTY ) ) < 0 ) {
	mes "error : "+ @ins;
	close;
}
if ( instance_attachmap( "guild_vs2", @ins, 1, getcharid(1)+"RAID" ) == "" ) {
	mes "error : 5";
	instance_destroy @ins;
	close;
}
instance_set_timeout 0, 1, @ins;
instance_init @ins;
instance_attach @ins;
 
Back
Top