Jump to content
  • 0
mrlongshen

Simple warper goes crazy

Question

prontera,151,186,5	script	Jumper	113,{mes "Where do you want to be warped?";next;.@select = select( implode( .warps$, ":" ) );mes "Are you sure you want to be warped to: "+ .warps$[.@select] +"?";if( select( "Yes, warp me now.", "No, I've changed my mind." ) == 2 ){ close; }warp .maps$[.@select],.x[.@select],.y[.@select];close;OnInit:waitingroom "Custom Warper",0;setarray .warps$[0],					"^0000FFFishing Room^000000";setarray .maps$[0],						"prontera";setarray .x[0],				111; //Fishing Roomsetarray .y[0],					111; //Fishing Roomend;}

Hello all, I have the simple warper. But why when I choose the first, its go to the second map, I choose 2nd, it go 3rd map, and when I choose lastly, it will not warp, its show error.

 

[Debug]: mapindex_name2id: Map "" not found in index list![Debug]: Source (NPC): Jumper at prontera (151,186)[Debug]: pc_setpos: Passed mapindex(0) is invalid![Error]: buildin_warp: moving player 'GM Dominic' to "",0,0 failed.[Debug]: Source (NPC): Jumper at prontera (151,186)
Edited by mrlongshen

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Change select statement to

.@select = select( implode( .warps$, ":" ) )-1;

 

Since select() returns from 1 and array index starts from 0

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

×
×
  • Create New...

Important Information

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