Help me please
#1

Hi guys, I was creating a duel system FS and I got some errors

C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(73) : error 017: undefined symbol "pName"
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(75) : error 017: undefined symbol "pName"
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(75) : warning 215: expression has no effect
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(75) : error 001: expected token: ";", but found "]"
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(75) : error 029: invalid expression, assumed zero
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(75) : fatal error 107: too many error messages on one line

I don't know how to solve this.

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new duelerid = GetPVarInt(playerid, "InviterId");
    if(GetPVarInt(duelerid, "InDuel") == 1 && GetPVarInt(playerid, "InDuel") == 1)
    {
        new Reason[56];
        switch(reason)
        {
            case 0: format(Reason, sizeof(Reason), "TimeOut");
            case 1: format(Reason, sizeof(Reason), "Quit");
            case 2: format(Reason, sizeof(Reason), "Kicked");
        }
        new string[150];
        format(string, sizeof(string), "[Duel]:%s has left the server during a duel with %s (Reason: %s)", pName(playerid), pName(duelerid), Reason);
        SendClientMessageToAll(COLOR_DUEL, string);
        format(string, sizeof(string), "[Duel]:%s won the duel against %s (%s, %s, %s)", pName(dulerid), pName(playerid),  weaponNames(Slot[0]), weaponNames(Slot[1]), weaponNames(Slot[2]));// line 75
        SendClientMessageToAll(COLOR_DUEL, string);
       
        SetPlayerArmour(playerid, 0);
        SetPlayerArmour(dulerid, 0);
       
        RemoveFromDuel(playerid);
        RemoveFromDuel(dulerid);
        SpawnPlayer(dulerid);
    }
    return 1;
}
Reply
#2

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
pName[MAX_PLAYER_NAME];
    new 
duelerid GetPVarInt(playerid"InviterId");
    if(
GetPVarInt(duelerid"InDuel") == && GetPVarInt(playerid"InDuel") == 1)
    {
        new 
Reason[56];
        switch(
reason)
        {
            case 
0format(Reasonsizeof(Reason), "TimeOut");
            case 
1format(Reasonsizeof(Reason), "Quit");
            case 
2format(Reasonsizeof(Reason), "Kicked");
        }
        new 
string[150];
        
format(stringsizeof(string), "[Duel]:%s has left the server during a duel with %s (Reason: %s)"pName(playerid), pName(duelerid), Reason);
        
SendClientMessageToAll(COLOR_DUELstring);
        
format(stringsizeof(string), "[Duel]:%s won the duel against %s (%s, %s, %s)"pName(dulerid), pName(playerid),  weaponNames(Slot[0]), weaponNames(Slot[1]), weaponNames(Slot[2]));// line 75
        
SendClientMessageToAll(COLOR_DUELstring);
        
        
SetPlayerArmour(playerid0);
        
SetPlayerArmour(dulerid0);
        
        
RemoveFromDuel(playerid);
        
RemoveFromDuel(dulerid);
        
SpawnPlayer(dulerid);
    }
    return 
1;

Reply
#3

I got new errors

C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(74) : error 012: invalid function call, not a valid address
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(74) : warning 215: expression has no effect
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(74) : error 001: expected token: ";", but found ")"
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duelsystem.pwn(74) : error 029: invalid expression, assumed zero
C:\Users\PART\Desktop\Desktop\Games+ Game Stuffs\0.3d\filterscripts\duel


line 74

pawn Код:
format(string, sizeof(string), "[Duel]:%s has left the server during a duel with %s (Reason: %s)", pName(playerid), pName(duelerid), Reason);
Reply
#4

Код:
new pName[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(dulerid, name, sizeof(name));
format(string, sizeof(string), "[Duel]:%s has left the server during a duel with %s (Reason: %s)", pName, name, Reason); 
SendClientMessageToAll(COLOR_DUEL, string); 
format(string, sizeof(string), "[Duel]:%s won the duel against %s (%s, %s, %s)", name, pName,  weaponNames(Slot[0]), weaponNames(Slot[1]), weaponNames(Slot[2]));// line 75 
SendClientMessageToAll(COLOR_DUEL, string);
Reply
#5

still the same errors -_-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)