Jump to content
  • 0

how to fix this error on code


Brynner

Question


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

im getting error fox this line

 

sc_start(&sd->bl, SC_TRICKDEAD, 100, 1, 1000); //Duration does not matters as Trick Dead is "eternal"

 

Error 4 error C2059: syntax error : ','

 

int atcommand_sleep(const int fd, struct map_session_data* sd, const char* command, const char* message)
{


 if(map_flag_gvg(sd->bl.m) || map_flag_vs(sd->bl.m)){
 clif_displaymessage(fd, "you can't....");
 return -1;
 }
	if(!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > 10) {
	if(sd->sc.opt1 != 0 && sd->sc.opt1 != OPT1_SLEEP){
		clif_displaymessage(fd, msg_txt(707)); //Please refrain from trying to abuse this command.
			return -1;
	}
	if(sd->sc.opt1 != OPT1_SLEEP){
		sc_start(&sd->bl, SC_TRICKDEAD, 100, 1, 1000); //Duration does not matters as Trick Dead is "eternal"
		sd->sc.opt1 = OPT1_SLEEP;
		sc_start(&sd->bl,SC_COMA,100,1,skill_get_time2(185,1));
		clif_displaymessage(fd, msg_txt(705)); //You are now asleep.
	} else {
		sd->sc.opt1 = 0;
		clif_emotion(&sd->bl,45);
		status_change_end(&sd->bl, SC_TRICKDEAD, -1);
		sc_start(&sd->bl,SC_COMA,100,1,skill_get_time2(185,1));
		clif_displaymessage(fd, msg_txt(706)); //You are now awake.
	}

		clif_changeoption(&sd->bl);
			return 0;
	}
		clif_displaymessage(fd, msg_txt(707)); //Please refrain from trying to abuse this command.
			return -1;
}
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

got the error msg? lines?

 

idk which svn changes that gives 1 more param on sc_start, then maybe it should be

 

sc_start(NULL,&sd->bl, SC_TRICKDEAD, 100, 1, 1000); //Duration does not matters as Trick Dead is "eternal"

Edited by Cydh
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

Error 4 error C2059: syntax error : ','

 

when i clicked it. it bring me here.

 

sc_start(&sd->bl, SC_TRICKDEAD, 100, 1, 1000); //Duration does not matters as Trick Dead is "eternal"

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Error 4 error C2059: syntax error : ','

 

when i clicked it. it bring me here.

 

sc_start(&sd->bl, SC_TRICKDEAD, 100, 1, 1000); //Duration does not matters as Trick Dead is "eternal"

just edited my post. :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

thank you it works now.

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