01.02.2018, 14:05
I'm currently experiencing few errors,
So when the stock is like that I have errors:
but if I change this
to
I get errors
So when the stock is like that I have errors:
Код:
stock SendMessageToAdmins(text[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(pInfo[playerid][Admin] =< 1 (i)) { SendClientMessage(i, -1, text); } } }
Код:
if(pInfo[playerid][Admin]=< 1 (i))
Код:
if(IsPlayerAdmin(i))
Код:
C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(1847) : error 017: undefined symbol "playerid" C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(1847) : warning 215: expression has no effect C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(1847) : error 001: expected token: ";", but found ")" C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(1847) : error 029: invalid expression, assumed zero C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(1847) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
CMD:report(playerid, params[]) { new id, reason[150]; if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) /report [id] [reason]"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) The player you're trying to report is not connected!"); new str[150], sender[MAX_PLAYER_NAME], receiver[MAX_PLAYER_NAME]; GetPlayerName(playerid, sender, sizeof(sender)); GetPlayerName(id, receiver, sizeof(receiver)); format(str, sizeof(str), "(FF0000}(REPORT) {FFFFFF}%s {FF0000}has reported {ffffff}%s {FF0000} for {FFFFFF}: %s", sender, receiver, reason); SendMessageToAdmins(str); SendClientMessage(playerid, -1, "{809fff}(INFO) Your report has been successfully sent!"); return 1; } stock SendMessageToAdmins(text[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(pInfo[playerid][Admin](i)) { SendClientMessage(i, -1, text); } } }