Mein freund hat mir mal ein command auß seinem script geschickt aber bei mir kommen da ERRORs C:\Users\K1ngK3nny\Desktop\Mein Server\gamemodes\TestServer.pwn(75) : error 017: undefined symbol "pInfo"
C:\Users\K1ngK3nny\Desktop\Mein Server\gamemodes\TestServer.pwn(75) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\K1ngK3nny\Desktop\Mein Server\gamemodes\TestServer.pwn(823) : warning 235: public function lacks forward declaration (symbol "SendAdminMessage")
C:\Users\K1ngK3nny\Desktop\Mein Server\gamemodes\TestServer.pwn(829) : error 017: undefined symbol "pAdmin"
zeilen:
new PlayerInfo[MAX_PLAYERS][pInfo];
if(strcmp(cmdtext, "/report", true) == 0)
{
if(IsPlayerAnAdmin(playerid,5))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_RED, "Benutze: /report [text]");
return 1;
}
format(string, sizeof(string), "Report von %s(ID: %d): %s" , sendername,playerid, (result));
SendAdminMessage(COLOR_YELLOW,string);
SendClientMessage(playerid, COLOR_YELLOW, "Dein Report wurde an die Admins weitergeleitet.");
}
return 1;
}
public SendAdminMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}