08.02.2013, 01:26
now i have converted half of my comments it used to be DCMD but now its ZCMD i cant seem to find out whats this error mean any ideas peeps
(32245) : error 017: undefined symbol "giveplayerid"
(32247) : error 017: undefined symbol "sendername"
(32245) : error 017: undefined symbol "giveplayerid"
(32247) : error 017: undefined symbol "sendername"
Код:
CMD:extortion(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[128];
new businesstype[128];
new tmp[128], idx, cmd[128];
new id = PlayerInfo[playerid][pPbiskey];
format( string, sizeof( string ), "Businesses/Business_%d.ini", id);
if(!dini_Exists(string))
{
SendClientMessage( playerid, COLOR_GREY, " You don't own a Business!" );
return 1;
}
tmp = strtok(params, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /extortion [PlayerID/PartOfName] (or 555 for Nobody)");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* %s is know Extortioning your Business.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has adjusted his Business, you are now Extortioning his Business.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s",giveplayer);
strmid(BizzInfo[id][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "Business Extortion Name set to %s",BizzInfo[id][bExtortion]);
SaveBusiness(id);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
else if(giveplayerid == 555)
{
format(string, sizeof(string), "Nobody");
strmid(BizzInfo[id][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "Business Extortion Name set to %s",BizzInfo[id][bExtortion]);
SaveBusiness(id);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Invalid ID!");
return 1;
}
}
return 1;
}


