11.10.2017, 17:19
Hey guys i made this cmd but it send me this error / warnings
i think i define my line correctly here line 507:
full code:
Код:
C:\Users\Jaua\Downloads\gta-rp\gamemodes\LIMPIO.pwn(507) : error 012: invalid function call, not a valid address C:\Users\Jaua\Downloads\gta-rp\gamemodes\LIMPIO.pwn(507) : warning 215: expression has no effect C:\Users\Jaua\Downloads\gta-rp\gamemodes\LIMPIO.pwn(507) : error 001: expected token: ";", but found ")" C:\Users\Jaua\Downloads\gta-rp\gamemodes\LIMPIO.pwn(507) : error 029: invalid expression, assumed zero C:\Users\Jaua\Downloads\gta-rp\gamemodes\LIMPIO.pwn(507) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
PHP код:
format(string, sizeof(string), "Advertisement: %s Contact: %s Ph: %d", params, name(playerid), PlayerInfo[playerid][Phone]);
PHP код:
CMD:advertise(playerid, params[])
{
new string[128], name[64] ;
GetPlayerName(playerid, name, sizeof(name));
if(PlayerInfo[playerid][pLevel] < 1) return SendClientMessage(playerid, COLOR_CORRECTION, "You must be level 2 to place an advertise!");
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_CORRECTION, "USAGE: (/ad)vertise [Advert Text]");
if(ServerAdvert == 1)
{
SendClientMessage(playerid, COLOR_CORRECTION, "Only one advertisement can be published every 120 seconds!");
}
else
{
ServerAdvert = 1;
format(string, sizeof(string), "Advertisement: %s Contact: %s Ph: %d", params, name(playerid), PlayerInfo[playerid][Phone]);
SendClientMessageToAll(COLOR_ADVERTISE, string);
SetTimer("AdTimer", 120000, false);
GivePlayerMoney(playerid, -1000);
}
return 1;
}
CMD:ad(playerid, params[])
{
return cmd_advertise(playerid, params);
}
public AdTimer()
{
ServerAdvert = 0;
return 1;
}