Help fixing a warning,to fix my errors so i can run my script :D
#1

C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ ms.pwn(102) : warning 217: loose indentation]
IGNORE THIS!! WARNING UP ME,i Know how to fix it

------------------------------------------------------------------------------------------------------
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ ms.pwn(651) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

pawn Код:
stock GetPlayerZone(playerid)
{
    for(new i=0; i < sizeof(ZoneInfo); i++)
    {
        if(IsPlayerInZone(playerid, i))
        {
            return i;
        }
    }
    return -1;
}
Help me removing the warning.

its warning,and its the FIRST! :P
If the warning fixes,errors gets fixed too.. if you know what i mean.

stock GetPlayerZone(playerid)

__________________________________________________ ___________________________
The errors

Код:
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(102) : warning 217: loose indentation
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(447) : error 017: undefined symbol "GetPlayersInZone"
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(655) : error 017: undefined symbol "IsPlayerInZone"
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(651) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Line 447
PHP код:
if(GetPlayersInZone(iZoneAttacker[i]) >= 1// there must be at least 1 attacker left
            

Line 655
PHP код:
      if(IsPlayerInZone(playeridi)) 
____________________________
If you need more info,let me know
Reply
#2

PHP код:
#pragma unused playerid 
Edit: you didn't post the errors, until after i posted.
Reply
#3

you didn't have those functions
pawn Код:
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(447) : error 017: undefined symbol "GetPlayersInZone"
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(655) : error 017: undefined symbol "IsPlayerInZone
getplayersinzone
and
isplayerinzone
Reply
#4

Quote:
Originally Posted by =WoR=G4M3Ov3r
Посмотреть сообщение
PHP код:
#pragma unused playerid 
Still:
Код:
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(103) : warning 217: loose indentation
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(448) : error 017: undefined symbol "GetPlayersInZone"
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(656) : error 017: undefined symbol "IsPlayerInZone"
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(652) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#5

Show us your "GetPlayersInZone" and "IsPlayerInZone"
Reply
#6

This is the function:
PHP код:
stock GetPlayerZone(playerid)
{
    for(new 
i=0sizeof(ZoneInfo); i++)
    {
        if(
IsPlayerInZone(playeridi))
        {
            return 
i;
        }
    }
    return -
1;

Anything else? please i need to fix it so i can test my turf takeover.

PHP код:
public OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
ZoneTimer()
{
    for(new 
i=0sizeof(ZoneInfo); i++) // loop all zones
    
{
        if(
ZoneAttacker[i] != -1// zone is being attacked
        
{
            if(
GetPlayersInZone(iZoneAttacker[i]) >= 1// there must be at least 1 attacker left
            
{
                
ZoneAttackTime[i]++;
                if(
ZoneAttackTime[i] == TAKEOVER_TIME// zone has been under attack for enough time and attackers take over the zone
                
{
                    
GangZoneStopFlashForAll(ZoneID[i]);
                    
ZoneInfo[i][zTeam] = ZoneAttacker[i];
                    
GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
                    
ZoneAttacker[i] = -1;
                }
            }
            else 
// attackers failed to take over the zone
            
{
                
GangZoneStopFlashForAll(ZoneID[i]);
                
ZoneAttacker[i] = -1;
            }
        }
    }
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;

Reply
#7

But the errors your receiving are about "GetPlayersInZone" and "IsPlayerInZone" missing.

Change the lines that include those, to the actual functions you are using.
Reply
#8

This may or may not help but try using the native function IsPlayerInRangeOfPoint

To read more about it: https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

This should take you 20 - 30 seconds to change so get back to us ASAP
Reply
#9

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
This may or may not help but try using the native function IsPlayerInRangeOfPoint

To read more about it: https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

This should take you 20 - 30 seconds to change so get back to us ASAP
I think what he needs, is different.
Reply
#10

Quote:
Originally Posted by =WoR=G4M3Ov3r
Посмотреть сообщение
I think what he needs, is different.
Check your Visitor message,the link..
i'm Using attack #2
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)