Halo, ich habe einen AdminChat erstellt, nur ein Problem:
Der Befehl:
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
{
if(IsPlayerConnected(playerid))
{
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_GRAD2, "Verwendung: (/a)dmin [text]");
return 1;
}
format(string, sizeof(string), "*Level %d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
if(Spieler[playerid][Admin] > 0)
{
SendAdminMessage(COLOR_YELLOW, string);
}
printf("Admin %s: %s", sendername, result);
}
return 1;
}
Die errrors:
ZitatC:\Users\Luka\Desktop\SAMP 0.3e\gamemodes\Selfmade.pwn(252) : error 017: undefined symbol "cmd"
C:\Users\Luka\Desktop\SAMP 0.3e\gamemodes\Selfmade.pwn(256) : error 017: undefined symbol "sendername"
C:\Users\Luka\Desktop\SAMP 0.3e\gamemodes\Selfmade.pwn(256) : error 017: undefined symbol "sendername"
C:\Users\Luka\Desktop\SAMP 0.3e\gamemodes\Selfmade.pwn(256) : error 029: invalid expression, assumed zero
C:\Users\Luka\Desktop\SAMP 0.3e\gamemodes\Selfmade.pwn(256) : fatal error 107: too many error messages on one line