Many Errors During Compile That I Do Not Understand
#1

Errors I Do Not Understand
Код:
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(191) : error 001: expected token: ";", but found "{"
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(22519) : warning 217: loose indentation
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(22930) : warning 217: loose indentation
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65656) : warning 235: public function lacks forward declaration (symbol "TimerName")
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65658) : error 017: undefined symbol "playerid"
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65660) : error 017: undefined symbol "ObjectID"
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65660) : warning 215: expression has no effect
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65660) : error 001: expected token: ";", but found "]"
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65660) : error 029: invalid expression, assumed zero
C:\Users\Robert\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65660) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
pawn Код:
new RandomFireSpawn
{X, Y, Z },
{X, Y, Z},
{X, Y, Z};//This is of the X, Y, Z of fire spawns.
pawn Код:
public TimerName()
{
    if(IsPlayerConnected(playerid))
    {
        CreateObject(ObjectID, RandomFireSpawn[0], RandomFireSpawn[1], RandomFireSpawn[2],0, 0, 0, 0);
        SetPlayerMapIcon(playerid, IConID, RandomFireSpawn[1],RandomFireSpawn[1],RandomFireSpawn[1], 55, COLOR_WHITE, 0);
        SendFactionMessage(factionID, COLOR_PINK, " Dispatch: There has been a fire located within the city of LS");//This is a example code, the code you would use is what ever you use, as for /®adio for the LSFMD. Same thing, minus the string. You already have the preset text.
        KillTimer(TimerName);
    }
    return 1;
}

//Now, for the health.
new FireHPTimer[MAX_PLAYERS];
forward HealthFire(playerid)
public HealthFire(playerid);
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid,5.0,RandomFireSpawn[0],RandomFireSpawn[1],RandomFireSpawn[2]))
        {
            FireHPTimer[playerid] = SetTimerEx("FireHealthTime", 25000, false, "i", playerid);//Set for 25 seconds.
        }
    }
    return 1;
}
forward FireHealthTime(playerid)
public FireHealthTime(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:health;
        GetPlayerHealth(playerid, health);
        SetPlayerHealth(playerid, health-25.0);//In 25 seconds, if not treated he will loose 25 HP
    }
    return 1;
}
Reply
#2

pawn Код:
public TimerName()
{
    if(IsPlayerConnected(playerid))
    {
        CreateObject(ObjectID, RandomFireSpawn[0], RandomFireSpawn[1], RandomFireSpawn[2],0, 0, 0, 0);
        SetPlayerMapIcon(playerid, IConID, RandomFireSpawn[1],RandomFireSpawn[1],RandomFireSpawn[1], 55, COLOR_WHITE, 0);
        SendFactionMessage(factionID, COLOR_PINK, " Dispatch: There has been a fire located within the city of LS");//This is a example code, the code you would use is what ever you use, as for /®adio for the LSFMD. Same thing, minus the string. You already have the preset text.
        KillTimer(TimerName);
    }
    return 1;
}

//Now, for the health.
new FireHPTimer[MAX_PLAYERS];
forward HealthFire(playerid); // <- I have added a semi-colon at the end of this line
public HealthFire(playerid) // <- I have removed the semi-colon at the end of this line
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid,5.0,RandomFireSpawn[0],RandomFireSpawn[1],RandomFireSpawn[2]))
        {
            FireHPTimer[playerid] = SetTimerEx("FireHealthTime", 25000, false, "i", playerid);//Set for 25 seconds.
        }
    }
    return 1;
}
forward FireHealthTime(playerid); // <- I have added a semi-colon at the end of this line
public FireHealthTime(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:health;
        GetPlayerHealth(playerid, health);
        SetPlayerHealth(playerid, health-25.0);//In 25 seconds, if not treated he will loose 25 HP
    }
    return 1;
}
Give that a go, hopefully I spotted em all! Also, you may need to move your forward statements to the top of your script before any functions/callbacks... I could be completely wrong with that though!
Reply
#3

Now would this only spawn one of those fires or that whole group?
Reply
#4

playerid is not defined in the timer function , you need to do this
pawn Код:
for(new i =0;i<MAX_PLAYERS;i++)
then replace all
pawn Код:
playerid
with
pawn Код:
i
Reply
#5

Код:
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(105) : error 001: expected token: ";", but found "{"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65683) : error 017: undefined symbol "ObjectID"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65683) : warning 215: expression has no effect
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65683) : error 001: expected token: ";", but found "]"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65683) : error 029: invalid expression, assumed zero
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65683) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#6

for ObjectID you have to either define it like #define ObjectID (Put the fire object id here)
Reply
#7

Код:
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(106) : error 001: expected token: ";", but found "{"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65684) : error 028: invalid subscript (not an array or too many subscripts): "RandomFireSpawn"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65684) : warning 215: expression has no effect
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65684) : error 001: expected token: ";", but found "]"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65684) : error 029: invalid expression, assumed zero
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65684) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#8

Bump 24 hours.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)