Help me please -
nilanjay - 19.03.2012
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;
}
Re: Help me please -
Bogdan1992 - 19.03.2012
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME];
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;
}
Re: Help me please -
nilanjay - 19.03.2012
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);
Re: Help me please -
Bogdan1992 - 19.03.2012
Код:
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);
Re: Help me please -
nilanjay - 19.03.2012
still the same errors -_-