12.07.2018, 08:08
Guys im making a /givemonye cmd and /setmoney but now when i try to compile show me this just with my cmd /givemoney
line 1766
PHP код:
CMD:givemoney(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 4)
{
new string[128], string2[128], giveplayerid, money;
if(sscanf(params, "ud", giveplayerid, money)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givemoney [PlayerID / PartOfName] [Money]");
if(IsPlayerConnected(giveplayerid))
{
GivePlayerMoney(giveplayerid, money);
format(string, sizeof(string), "You have give player %s's $%d.",GetName(giveplayerid),money);//You have set %s's cash to an amount of $%d.
SendClientMessage(playerid, COLOR_SUCCESS, string);
format(string2 ,sizeof(string2),"Admin Notification: Administrator %s has given you $%d.", GetName(id), money);
SendClientMessage(playerid, COLOR_SUCCESS, string2);
new ip[32], ipex[32];
new i_dateTime[2][3];
gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
GetPlayerIp(playerid, ip, sizeof(ip));
GetPlayerIp(giveplayerid, ipex, sizeof(ipex));
format(string, sizeof(string), "[%i/%i/%i - %i:%i:%i] %s (IP:%s) has paid $%d to %s (IP:%s)", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], GetName(playerid), ip, money, GetName(giveplayerid), ipex);
PayLog(string);
PlayerInfo[playerid][pCash] = money;
}
}
else
{
SendClientMessage(playerid, COLOR_CORRECTION, "You are not authorized to use that command !");
}
return 1;
}
Код HTML:
C:\Users\Jaua\Downloads\samp037_svr_R2-1-1_win32\gamemodes\baserp.pwn(1766) : error 017: undefined symbol "id" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
PHP код:
format(string2 ,sizeof(string2),"Admin Notification: Administrator %s has given you $%d.", GetName(id), money);