30.12.2010, 17:44
Not sure what's wrong,c an anyone help?
pawn Код:
if(strcmp(cmd, "/plate", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!IsAtDealership(playerid))
{
return 1;
}
if(!strlen(tmp))
{
if(PlayerToPoint(3.0, playerid,2130.7195,-1147.0983,24.3918))
new length = strlen(cmdtext); // 24559
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
idx++;
if(!strlen(result)) return SendClientMessage(playerid, COLOR_GREY, "USE: {AA3333}/plate{AFAFAF} [plate number]");
SetVehicleNumberPlate(GetPlayerVehicleID(playerid), result);
} //24575
return 1;
}
}
Код:
(24559) : error 003: declaration of a local variable must appear in a compound block (24559) : error 017: undefined symbol "length" (24560) : error 017: undefined symbol "length" (24566) : error 017: undefined symbol "length""