Jump to content
  • 0
Sign in to follow this  
Kubix

Instances crash

Question

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

 

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

what's the error at console?

I don't have errors.

Client crushing.

 

Solved.

 

 

mes instance_mapname("1@elements", .@instance);

-> 0001@elemen, but mapname is elements

Share this post


Link to post
Share on other sites
  • 0

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.)

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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); :D

Share this post


Link to post
Share on other sites
  • 0

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 Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

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 ._.



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

Share this post


Link to post
Share on other sites
  • 0

@@Aeromesi

 

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

 

here's mine:

 

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;

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.