Errori i Warninzi

Započeo Jiky, April 09, 2019, 15:52:09 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Resio sam da pravim cops and robbers gmod , ali mi izbacuje ove errore i warninge
[pawn]D:\Filip\Jiky Cops And Robbers\gamemodes\JCNR.pwn(151) : error 029: invalid expression, assumed zero
D:\Filip\Jiky Cops And Robbers\gamemodes\JCNR.pwn(151) : warning 215: expression has no effect
D:\Filip\Jiky Cops And Robbers\gamemodes\JCNR.pwn(151) : error 001: expected token: ";", but found "return"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
[/pawn]

Deo skripte:[pawn]public OnPlayerDeath(playerid, killerid, reason)
{
   if(gTeam[killerid] == TEAM_COPS)
   {
      if(gTeam[playerid] == TEAM_COPS)
      {
          SendClientMessage(killerid,COLOR_RED,"[SERVER]{0xFFFFFFAA}Team Killing is not allowed!");
          ResetPlayerWeapons(killerid);
      }
      else
      {
         if(GetPlayerWantedLevel(playerid) == 0)
         {
            SendClientMessage(killerid,COLOR_RED,"[SERVER]{0xFFFFFFAA}You are not allowed to kill innocent people!");
              ResetPlayerWeapons(killerid);
         }
         else if(GetPlayerWantedLevel(playerid) == 3) return SendClientMessage(killerid,COLOR_RED,"[SERVER]{0xFFFFFFAA}You shouldn't arrest low wanted players!{0xFFFF00AA}(YELLOW)");
         else return GivePlayerMoney(killerid,3000);
      }
   }
   else
   {
       if(GetPlayerWantedLevel(killerid) == 0 || GetPlayerWantedLevel(killerid) == 3)
    {
       SetPlayerWantedLevel(killerid,6);
       SetPlayerColor(killerid,COLOR_RED);
       GivePlayerMoney(killerid,1500);
       SendClientMessage(killerid,COLOR_RED,"[SERVER]{0xFFFFFFAA}You are now high wanted player!{0xAA3333AA}(RED)");
      else return GivePlayerMoney(killerid,1500);
      }
   }
   return 1;
}
//==============================================================================
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
   if(gTeam[playerid] == TEAM_CIVIL && GetPlayerWantedLevel(playerid) == 0)
   {
       SetPlayerWantedLevel(playerid,3);
       SetPlayerColor(playerid,COLOR_YELLOW);
       SendClientMessage(playerid,COLOR_RED,"[SERVER]{0xFFFFFFAA}You are now wanted for attacking people!");
   }
   return 1;
}
//==============================================================================[/pawn]

daj tu liniju gde ti izbacuje error
• Website: www.vasic.dev
Web Development & Cyber Security

Imas else return unutar if-a wtf?
Makni to nek ostane samo give Player money
Edit: ipak spusti ispod bracketa, omasio si mesto, ne moraš brisati
Respect: Bašovski, Captain Foux, Purda (sladak) and Harexe!



Citat: Vasic poslato April 09, 2019, 15:57:33 POSLE PODNE
daj tu liniju gde ti izbacuje error
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)

Citat: Jiky poslato April 09, 2019, 16:49:51 POSLE PODNE
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
Nema potrebe da nam daješ gde baca error, vidi se iz aviona, izvoli fixano, nije kao da sam rekao gde je problem al ae:
KLIKNI ME NEŽNO
Respect: Bašovski, Captain Foux, Purda (sladak) and Harexe!