Jump to content
  • 0

Question

16 answers to this question

Recommended Posts

Posted
 
skill.c: In function âskill_parse_row_nonearnpcrangedbâ:
skill.c:18524: warning: comparison is always false due to limited range of data type
        CC      atcommand.c
atcommand.c: In function âatcommand_basecommandsâ:
atcommand.c:9406: error: âatcommand_reloadmsgconfâ undeclared (first use in this function)
atcommand.c:9406: error: (Each undeclared identifier is reported only once
atcommand.c:9406: error: for each function it appears in.)
make[1]: *** [obj_sql/atcommand.o] Error 1
make[1]: Leaving directory `/root/rathena/src/map'
make: *** [map] Error 2


this is my atcommand.c
Posted

try to change

                ACMD_DEF(join),
                ACMD_DEF(channel),
                ACMD_DEF(fontcolor),
                ACMD_DEF(langtype),
                ACMD_DEF(reloadmsgconf)
        };

to

                ACMD_DEF(join),
                ACMD_DEF(channel),
                ACMD_DEF(fontcolor),
                ACMD_DEF(langtype),
                //ACMD_DEF(reloadmsgconf)
        };
Posted (edited)

in atcommand.c find:

	//wrong or no entry
	clif_displaymessage(fd,msg_txt(sd,460)); // Please enter a valid language (usage: @langtype <language>).
	clif_displaymessage(fd,msg_txt(sd,464)); // ---- Available languages:
	while(test!=-1){ //out of range
		test = msg_checklangtype(i,false);
		if(test == 1)
			clif_displaymessage(fd,msg_langtype2langstr(i));
		i++;
	}
	return -1;
}

after that insert these lines:

 

/*==========================================
* @afk
*------------------------------------------*/
ACMD_FUNC(afk) {
 
		nullpo_retr(-1, sd);

				if(sd->bl.m == map_mapname2mapid("prontera")) {
				clif_displaymessage(fd, "@afk is not allowed on this map.");
				return 0;
				}

				if( pc_isdead(sd) ) {
				clif_displaymessage(fd, "Cannot @afk if you are dead.");
				return -1;
				}

				if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag )
				{

				if(map[sd->bl.m].flag.pvp  || map[sd->bl.m].flag.gvg){
				clif_displaymessage(fd, "You may not use the @afk maps PVP or GVG.");
				return -1;}

						sd->state.autotrade = 1;
						sd->state.monster_ignore = 1;
						pc_setsit(sd);
						skill_sit(sd,1);
						clif_sitting(&sd->bl);
						clif_changelook(&sd->bl,LOOK_HEAD_TOP,471);
                        clif_specialeffect(&sd->bl, 234,AREA);                       
						if( battle_config.afk_timeout )
						{
								int timeout = atoi(message);
								status_change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.afk_timeout) : battle_config.afk_timeout)*60000,0);
						}
						clif_authfail_fd(fd, 15);
				} else
						clif_displaymessage(fd, "@afk is not allowed on this map.");
		return 0;
}

then find:

		ACMD_DEF(langtype),

after that insert this line:

		ACMD_DEF(afk)

in battle.c find:

	{ "at_timeout",                         &battle_config.at_timeout,                      0,      0,      INT_MAX,        },

then after that insert this line:

	{ "afk_timeout",                        &battle_config.afk_timeout,                     0,      0,      INT_MAX,        },

in battle.h find:

	int at_timeout;

then after that insert this line:

	int afk_timeout;

in misc.conf find:

 // 1 = Yes
 // 2 = Yes, when there are unread mails
 mail_show_status: 0

then after that insert these lines:


// Set this to the amount of minutes afk chars will be kicked from the server.
afk_timeout: 0

 

then after that recompile your server. Hope these helps you

Edited by Kyroad
Posted

yea i try this but thank you i got error



1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9075): error C2143: syntax error : missing ';' before 'type'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9079): error C2059: syntax error : 'if'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9084): error C2059: syntax error : 'if'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9089): error C2059: syntax error : 'if'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9109): error C2059: syntax error : 'else'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9111): error C2059: syntax error : 'return'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9112): error C2059: syntax error : '}'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2143: syntax error : missing ')' before '('
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : ','
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2143: syntax error : missing ')' before 'constant'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2091: function returns function
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2143: syntax error : missing '{' before 'constant'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : '<Unknown>'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : ')'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : ')'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9117): error C2059: syntax error : 'while'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9123): error C2059: syntax error : 'return'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9124): error C2059: syntax error : '}'
1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9850): warning C4013: 'atcommand_basecommands' undefined; assuming extern returning int
 

error

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