Can Someone Help Me Resolve This error?
#1

The Errors

Код:
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(192) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(195) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(200) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(259) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(310) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(925) : warning 203: symbol is never used: "pName"
C:\Documents and Settings\Administrator\Desktop\New GTA Server\gamemodes\DeathMatch.pwn(925) : warning 203: symbol is never used: "string"
The Code

Код:
public OnPlayerConnect(playerid)
{
    AFKS[playerid] = 0;
}
    new string[64], pName[MAX_PLAYER_NAME];
	GetPlayerName,(playerid,pname,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s has joined the server!",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
	return 1;
Reply
#2

I think you just need to move the } down to the bottom like this:
pawn Код:
public OnPlayerConnect(playerid)
{
    AFKS[playerid] = 0;

    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName,(playerid,pname,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s has joined the server!",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)