我试着去编译,但即时得到这些错误:编译错误
1>.\item.cpp(123) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
1>.\commands.cpp(1372) : error C2057: expected constant expression
1>.\commands.cpp(1372) : error C2466: cannot allocate an array of constant size 0
1>.\commands.cpp(1372) : error C2133: 'buffer' : unknown size
线123 item.cpp
if((bool)random_range(0, 1))
线1372 commands.cpp
if(money < changeSexPrice)
{
char buffer[70 + changeSexPrice];
sprintf(buffer, "You do not have enough money. You need %d gold coins to change your sex.", changeSexPrice);
player->sendCancel(buffer);
return false;
}
什么想法?
回答在win32标记中花费%d金币。阅读错误消息。 – 2010-07-16 12:55:40
只是出于好奇:我需要多少金币来改变我的性别? – ereOn 2010-07-16 13:15:42