Hallo,
Ich versuche gerne ein einfaches /messages zu erstellen brauche aber etwas hilfe.
hier mal mein Pwn code.
if(strcmp("/messages", cmdtext, true, 10) == 0)
{
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s hat den Server betreten.", pName);
SendClientMessage(playerid, 0xAAAAAAAA, string);
}
else
{
new pName[MAX_PLAYERS_NAME], string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch (reason)
{
case 0: format(string, sizeof(string), "%s hat den Server verlassen. (Timeout)");
case 1: format(string, sizeof(string), "%s hat den Server verlassen.");
}
return 1;
}
D:\Selfmade.pwn(170) : warning 219: local variable "pName" shadows a variable at a preceding level
D:\Selfmade.pwn(172) : error 035: argument type mismatch (argument 2)
D:\Selfmade.pwn(172) : error 035: argument type mismatch (argument 2)
D:\Selfmade.pwn(170) : warning 204: symbol is assigned a value that is never used: "pName"
D:\Selfmade.pwn(170 -- 178) : warning 219: local variable "pName" shadows a variable at a preceding level
D:\Selfmade.pwn(178) : error 017: undefined symbol "MAX_PLAYERS_NAME"
D:\Selfmade.pwn(178) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Real: