23.07.2012, 01:37
Getting an error on a working line, any ideas?
Errors :
All on the same line.
pawn Код:
CMD:hedit(playerid, params[])
{
if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!");
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
return 1;
}
new string[128], choice[32], houseid, amount;
if(sscanf(params, "s[32]dD", choice, houseid, amount))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /hedit [name] [houseid] [(Optional)amount]");
if(PlayerInfo[playerid][pAdmin] < 99999)
{
SendClientMessageEx(playerid, COLOR_GREY, "Available names: CreateNext, CustomInterior, CustomExterior, Exterior(For only owned houses)");
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Available names: Interior, CustomInterior, CustomExterior,Exterior, Level, Price, CreateNext");
}
return 1;
}
else if(!strcmp(choice, "createnext", true)) // THIS LINE CONTAINS THE ERROR.
{
new cla,pri;
if(sscanf(params,"s[11]dd","createnext",cla,pri)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hedit createnext [Class] [Price]");
if(cla > 4 || cla < 1) return SendClientMessage(playerid, COLOR_WHITE, "Class ranges from 1 - 4");
if(pri < 0) return SendClientMessage(playerid, COLOR_WHITE, "Price cannot be lower than 0");
if(PlayerInfo[playerid][pAdmin] < 99999 && cla == 4) return SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to create a donator house.");
for(new x;x<MAX_HOUSES;x++)
{
if(HouseInfo[x][hOwned] == 0)
{
CreateHouse(playerid, x, cla, pri);
break;
}
}
}
return 1;
}
Quote:
error 029: invalid expression, assumed zero warning 215: expression has no effect error 001: expected token: ";", but found "if" |