Перейти к содержанию

Помогите разобратся с кодом ошибки )


Рекомендуемые сообщения

Помогите разобраться с кодом ошибки ) Учил немецкий язык ))) не пойму чего оно от меня хочет ругается после добавления команды SPB только в atcommand.c в остальных сорцах нет

atcommand.c: In function 'atcommand_partybuff':

atcommand.c:11049:6: warning: passing argument 1 of 'msg_txt' makes integer from pointer without a cast [enabled by default]

atcommand.c:110:13: note: expected 'int' but argument is of type 'struct map_session_data *'

atcommand.c:11049:6: error: too many arguments to function 'msg_txt'

atcommand.c:110:13: note: declared here

atcommand.c:11057:6: warning: passing argument 1 of 'msg_txt' makes integer from pointer without a cast [enabled by default]

atcommand.c:110:13: note: expected 'int' but argument is of type 'struct map_session_data *'

atcommand.c:11057:6: error: too many arguments to function 'msg_txt'

atcommand.c:110:13: note: declared here

atcommand.c:11060:6: warning: passing argument 1 of 'msg_txt' makes integer from pointer without a cast [enabled by default]

atcommand.c:110:13: note: expected 'int' but argument is of type 'struct map_session_data *'

atcommand.c:11060:6: error: too many arguments to function 'msg_txt'

atcommand.c:110:13: note: declared here

make[1]: *** [obj_sql/atcommand.o] Error 1

make[1]: Leaving directory `/var/www/eAthena/rAthena/src/map'

make: *** [map_sql] Error 2

Изменено пользователем hakilo
Ссылка на комментарий
Поделиться на другие сайты

кусок кода в студию

ACMD_FUNC(partybuff)

{

struct party_data* p = NULL;

nullpo_retr(-1, sd);

if( !sd->status.party_id ) {

clif_displaymessage(fd, msg_txt(sd,1450)); // You're not in a party.

return -1;

}

p = party_search(sd->status.party_id);

if( sd->state.spb ) {

sd->state.spb = 0;

clif_displaymessage(fd, msg_txt(sd,1451)); // Displaying party member's buffs disabled.

} else {

sd->state.spb = 1;

clif_displaymessage(fd, msg_txt(sd,1452)); // Displaying party member's buffs enabled.

}

clif_party_info(p,sd);

return 0;

}

ACMD_DEF(partybuff),

ACMD_DEF2("spb", partybuff),

Изменено пользователем hakilo
Ссылка на комментарий
Поделиться на другие сайты


ACMD_FUNC(partybuff)
{
struct party_data *p = NULL;
nullpo_retr(-1, sd);
if( !sd->status.party_id ) {
clif_displaymessage(fd, msg_txt(sd,1450)); // You're not in a party.
return -1;
}
p = party_search(sd->status.party_id);
if( sd->state.spb ) {
sd->state.spb = 0;
clif_displaymessage(fd, msg_txt(sd,1451)); // Displaying party member's buffs disabled.
} else {
sd->state.spb = 1;
clif_displaymessage(fd, msg_txt(sd,1452)); // Displaying party member's buffs enabled.
}
clif_party_info(p,sd);
return 0;
}

  • Upvote 1
Ссылка на комментарий
Поделиться на другие сайты


ACMD_FUNC(partybuff)
{
struct party_data *p = NULL;
nullpo_retr(-1, sd);
if( !sd->status.party_id ) {
clif_displaymessage(fd, msg_txt(sd,1450)); // You're not in a party.
return -1;
}
p = party_search(sd->status.party_id);
if( sd->state.spb ) {
sd->state.spb = 0;
clif_displaymessage(fd, msg_txt(sd,1451)); // Displaying party member's buffs disabled.
} else {
sd->state.spb = 1;
clif_displaymessage(fd, msg_txt(sd,1452)); // Displaying party member's buffs enabled.
}
clif_party_info(p,sd);
return 0;
}

нет не помогло

Ссылка на комментарий
Поделиться на другие сайты

не вижу ошибок в коде, какай эмулятор и что компилятор на этот раз пишет


make clean
make sql

все та же ошибка )

atcommand.c: In function 'atcommand_partybuff':

atcommand.c:11048:3: warning: passing argument 1 of 'msg_txt' makes integer from pointer without a cast [enabled by default]

atcommand.c:110:13: note: expected 'int' but argument is of type 'struct map_session_data *'

atcommand.c:11048:3: error: too many arguments to function 'msg_txt'

atcommand.c:110:13: note: declared here

atcommand.c:11054:3: warning: passing argument 1 of 'msg_txt' makes integer from pointer without a cast [enabled by default]

atcommand.c:110:13: note: expected 'int' but argument is of type 'struct map_session_data *'

atcommand.c:11054:3: error: too many arguments to function 'msg_txt'

atcommand.c:110:13: note: declared here

atcommand.c:11057:3: warning: passing argument 1 of 'msg_txt' makes integer from pointer without a cast [enabled by default]

atcommand.c:110:13: note: expected 'int' but argument is of type 'struct map_session_data *'

atcommand.c:11057:3: error: too many arguments to function 'msg_txt'

atcommand.c:110:13: note: declared here

Ладно спасибо,попробую разобраться ночью сегодня )

Ссылка на комментарий
Поделиться на другие сайты


ACMD_FUNC(partybuff)
{
struct party_data *p = NULL;
nullpo_retr(-1, sd);

if( !sd->status.party_id ) {
clif_displaymessage(fd, msg_txt(1450)); // You're not in a party.
return -1;
}

p = party_search(sd->status.party_id);

if( sd->state.spb ) {
sd->state.spb = 0;
clif_displaymessage(fd, msg_txt(1451)); // Displaying party member's buffs disabled.
} else {
sd->state.spb = 1;
clif_displaymessage(fd, msg_txt(1452)); // Displaying party member's buffs enabled.
}

clif_party_info(p,sd);

return 0;
}

  • Upvote 1
Ссылка на комментарий
Поделиться на другие сайты


ACMD_FUNC(partybuff)
{
struct party_data *p = NULL;
nullpo_retr(-1, sd);

if( !sd->status.party_id ) {
clif_displaymessage(fd, msg_txt(1450)); // You're not in a party.
return -1;
}

p = party_search(sd->status.party_id);

if( sd->state.spb ) {
sd->state.spb = 0;
clif_displaymessage(fd, msg_txt(1451)); // Displaying party member's buffs disabled.
} else {
sd->state.spb = 1;
clif_displaymessage(fd, msg_txt(1452)); // Displaying party member's buffs enabled.
}

clif_party_info(p,sd);

return 0;
}

Супер спасибо =)

Ссылка на комментарий
Поделиться на другие сайты

и снова я с ошибками

clif.c: In function 'clif_spawn':

clif.c:1635:27: error: 'sd' undeclared (first use in this function)

clif.c:1635:27: note: each undeclared identifier is reported only once for each function it appears in

clif.c:1636:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]

make[1]: *** [obj_sql/clif.o] Error 1

make[1]: Leaving directory `/var/www/eAthena/rAthena/src/map'

make: *** [map_sql] Error 2

Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...
Яндекс.Метрика