16.04.2018, 05:41
Guys i want to change this cmd strcmp to zcmd
i made this but i have a lot of errors and idk how to solve it cuz im new in this lenguage...
can you help me pls
errors:
PHP код:
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/ad)vertise [advert text]");
return 1;
}
if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
{
format(string, sizeof(string), " Please try again later %d seconds between Advertisements !", (addtimer/1000));
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
new payout = idx * 25;
if(GetPlayerMoney(playerid) < payout)
{
format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "Advertisement: %s, Contact: %s Ph: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
OOCNews(COLOR_GREEN,string);
format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx);
GameTextForPlayer(playerid, string, 5000, 5);
if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
}
return 1;
}
PHP код:
CMD:advertise(playerid, params[])
{
new string[128], name[MAX_PLAYER_NAME+1];
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_CORRECTION, "USAGE: (/ad)vertise [Advert Text]");
if(PlayerInfo[playerid][pAdmin] < 1)
{
if(PlayerInfo[playerid][pLevel] <= 1) return SendClientMessage(playerid, COLOR_CORRECTION, "You must be level 2 to place an advertise!");
if(ServerAdvert > gettime())
{
format(string, sizeof(string), "You must wait %d to put another ad", ServerAdvert - gettime());
return SendClientMessage(playerid, -1, string);
}
else
{
GetPlayerName(playerid, name, sizeof(name));
ServerAdvert = gettime()+120;// 120 seconds
format(string, sizeof(string), "Advertisement: %s Contact: %s Ph: %d", params, name, PlayerInfo[playerid][Phone]);
SendClientMessageToAll(COLOR_ADVERTISE, string);
GivePlayerMoney(playerid, -1000);
}
}
else
{
GetPlayerName(playerid, name, sizeof(name));
ServerAdvert = gettime()+120;// 120 seconds
format(string, sizeof(string), "Advertisement: %s Contact: %s Ph: %d", params, name, PlayerInfo[playerid][Phone]);
SendClientMessageToAll(COLOR_ADVERTISE, string);
GivePlayerMoney(playerid, -1000);
}
return 1;
}
errors:
Код:
C:\Users\Jaua\Downloads\Nuevo\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(430) : warning 201: redefinition of constant/macro (symbol "isnull(%1)") C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(181) : warning 217: loose indentation C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(182) : warning 217: loose indentation C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(183) : warning 217: loose indentation C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(184) : warning 217: loose indentation C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(244) : warning 217: loose indentation C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(245) : warning 217: loose indentation C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(604) : error 017: undefined symbol "pLevel" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(605) : error 017: undefined symbol "ServerAdvert" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(607) : error 017: undefined symbol "ServerAdvert" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(613) : error 017: undefined symbol "ServerAdvert" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(613) : warning 215: expression has no effect C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(614) : error 017: undefined symbol "Phone" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(622) : error 017: undefined symbol "ServerAdvert" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(622) : warning 215: expression has no effect C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(623) : error 017: undefined symbol "Phone" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins0" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins1" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins2" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins3" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins4" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins5" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins6" C:\Users\Jaua\Downloads\Nuevo\gamemodes\RP.pwn(629) : warning 203: symbol is never used: "FactSkins7" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.