Someone help me ?
#1

Код:
C:\Documents and Settings\Administrator\Desktop\New Folder (15)\XS\gamemodes\SFCRRPG.pwn(13219) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\New Folder (15)\XS\gamemodes\SFCRRPG.pwn(13219) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\Desktop\New Folder (15)\XS\gamemodes\SFCRRPG.pwn(13219) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
 public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA){
    if(Aranma[playerid] != 1){
    if(GetPlayerWantedLevel(playerid) >= 0 && GetPlayerWantedLevel(playerid) < 2)
    {
    IncreaseWantedLevel(playerid,2);
    else if(GetPlayerWantedLevel(playerid) < 4){
    IncreaseWantedLevel(playerid,4);
        }
      }
	}
  }
    return 1;
}
How can i fix this errors ?
Reply
#2

Код:
 public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA){
        if(Aranma[playerid] != 1){
            if(GetPlayerWantedLevel(playerid) >= 0 && GetPlayerWantedLevel(playerid) < 2)
            {
                IncreaseWantedLevel(playerid,2);
            }else if(GetPlayerWantedLevel(playerid) < 4){
                IncreaseWantedLevel(playerid,4);
            }
         }
    }
    return 1;
}
try this?
Reply
#3

Fix your indentation! You can't spot errors like that.
Reply
#4

Try with this.

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponid)
{
    if(
gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA)
    {
        if(
Aranma[playerid] != 1)
        {
            if(
GetPlayerWantedLevel(playerid) >= && GetPlayerWantedLevel(playerid) < 2)
            {
                
IncreaseWantedLevel(playerid,2);
            }
            else if(
GetPlayerWantedLevel(playerid) < 4)
            {
                
IncreaseWantedLevel(playerid,4);
            }
        }
    }
    return 
1;

Reply
#5

THANKS ALL I FIXED !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)