Jump to content
  • 0

incorrect use of close


Question

Posted (edited)

Hello i made these script 6 years ago and back then it never gave an issue but i recently decided to open another ro server and I'm getting a mapserver error. The error is "incorrect use of 'close' command. This is the script. i would like to know what changed so i can fix the script. thanks

daisy_01,279,275,4	script	-::-03	111,{

	cutin "wpage08",3;
	npctalk "Looks like one of the diary's page";
	npctalk "Do you wish to take the diary's page?";
	menu "Hmm, yea seem useful.",L_page08,"Naa, it's a waste of inventory space.",L_end3;

	L_page08:
	if(countitem(37009) != 0 ) goto L_got;
	getitem 37009,1;
	close;

	L_got:
	npctalk "You have 1 already";
	close;

	L_end3:
	npctalk "You left the diary's page.";
	close;
}

 

Edited by mirabell

3 answers to this question

Recommended Posts

  • 2
Posted (edited)

Change all your close statements to end;

 

You should only use close; when there's a mes statement somewhere to avoid that kind of error. In this case, you aren't using any mes, so don't use close;

Edited by Hijirikawa
  • Upvote 1
  • 0
Posted

thanks i figured it out and i came back to say i figure it out lol. i have another script with a error and that one i haven't figured out. but its unrelated so ill open another topic

thanks

 

  • 0
Posted

Hercules emulator enforce the usage of close() script command when your char is dealing with npc dialog otherwise you use end() script command instead.

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...