Errors.
#1

Hey. i got little errors.

PHP код:
C:\Users\yan\Desktop\AVT\gamemodes\AVT.pwn(228) : warning 202number of arguments does not match definition
C
:\Users\yan\Desktop\AVT\gamemodes\AVT.pwn(350) : warning 217loose indentation
C
:\Users\yan\Desktop\AVT\gamemodes\AVT.pwn(350) : error 029invalid expressionassumed zero
C
:\Users\yan\Desktop\AVT\gamemodes\AVT.pwn(350) : error 017undefined symbol "cmd_killme"
C:\Users\yan\Desktop\AVT\gamemodes\AVT.pwn(350) : error 029invalid expressionassumed zero
C
:\Users\yan\Desktop\AVT\gamemodes\AVT.pwn(350) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Kill command

PHP код:
CMD:killme(playeridparams[])//that line
{
  
SetPlayerHealth(playerid0);
  
PlayerInfo[playerid][Deaths]++;
  
GameTextForPlayer(playerid"~r~YOU HAVE DIED"30002);
  return 
1;

PHP код:
public OnPlayerDisconnect(playeridreason)
{
  new 
INI:File INI_Open(UserPath(playerid));
  
INI_SetTag(File,"Data");
  
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  
INI_WriteInt(File,"Admin",PlayerInfo[playerid][Admin]);
  
INI_WriteInt(File,"Kills",PlayerInfo[playerid][Kills]);
  
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][Deaths]);
  
INI_WriteInt(File,"Score",SetPlayerScore(playerid));//this line
  
INI_Close(File);
  return 
1;

On the kill command the weird thing that i got zcmd included..
Reply
#2

pawn Код:
INI_WriteInt(File,"Score",SetPlayerScore(playerid));
SetPlayerScore it's used when you set score. That's OnPlayerDisconnect, so lol, you need to get score, not to set lmafo.

pawn Код:
INI_WriteInt(File,"Score",GetPlayerScore(playerid));
pawn Код:
CMD:killme(playerid, params[])
{
    SetPlayerHealth(playerid, 0.0);
    PlayerInfo[playerid][Deaths]++;
    GameTextForPlayer(playerid, "~r~YOU HAVE DIED", 3000, 2);
    return 1;
}
Here isn't nothing wrong.. It's just bad identitation. I think that errors are from another command/function.
Reply
#3

oh, because setplayerscore sounds more something like to use

btw it's lmfao not lmafo :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)