Jump to content
  • 0

incorrect use of close


mirabell

Question


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  197
  • Reputation:   19
  • Joined:  11/20/11
  • Last Seen:  

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
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 2

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  197
  • Reputation:   19
  • Joined:  11/20/11
  • Last Seen:  

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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

Link to comment
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.   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.

×
×
  • Create New...