Fire Systeme Isuse need a help
#1

hello guys im making a Fire systeme Random and i got this Error

Код:
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2497) : error 017: undefined symbol "playerid"
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : error 012: invalid function call, not a valid address
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : error 017: undefined symbol "playerid"
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : error 029: invalid expression, assumed zero
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : 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
#2

Show us the function..
Reply
#3

We're not mind readers, you know ... Post the code that triggers the error.
Reply
#4

NOW THIS IS THE ERROR (4)

Код:
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : error 012: invalid function call, not a valid address
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : warning 215: expression has no effect
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : error 001: expected token: ";", but found ")"
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : error 029: invalid expression, assumed zero
C:\Users\Mininou\Desktop\Vodka\gamemodes\lslrp.pwn(2499) : fatal error 107: too many error messages on one line

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


4 Errors.
Код:
2499 ========>         RandomFireSpawn(i);

Код:
forward FireTimer(i)
public FireTimer(i)
{
    if(IsPlayerConnected(i))
    {
        RandomFireSpawn(i);
        KillTimer(TimerName);
    }
    return 1;
}

public RandomFireSpawn(playerid)
        {
        rand = random(sizeof(RandomFireSpawn));
        CreateObject(objectid, RandomFireSpawn[rand][0], RandomFireSpawn[rand][1], RandomFireSpawn[rand][2], 0.0,0.0, 0.0);
        SetPlayerMapIcon(playerid, 18, RandomFireSpawn[1],RandomFireSpawn[1],RandomFireSpawn[1], 55, COLOR_WHITE, 0);
            if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 3)
                {
                SendClientMessage(playerid, COLOR_GREEN, "Dispatch: A Fire Has Been Located Please Respond We Have Set A Icon.");
                }
        }
        return 1;
}
//Now, for the health.

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
#5

You're missing a bracket in your RandomFireSpawn function. You're opening two blocks, but you're closing three blocks. Fix the indentation and the location of the missing bracket will show up.
Reply
#6

Where do i fix it vince & thanks a lot for more explaining me
Reply
#7

pawn Код:
public RandomFireSpawn(playerid)
{
    rand = random(sizeof(RandomFireSpawn));
    CreateObject(objectid, RandomFireSpawn[rand][0], RandomFireSpawn[rand][1], RandomFireSpawn[rand][2], 0.0,0.0, 0.0);
    SetPlayerMapIcon(playerid, 18, RandomFireSpawn[1],RandomFireSpawn[1],RandomFireSpawn[1], 55, COLOR_WHITE, 0);
    if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 3)
    {
        SendClientMessage(playerid, COLOR_GREEN, "Dispatch: A Fire Has Been Located Please Respond We Have Set A Icon.");
    }
    return 1;
}
Try this. You had an extra bracket, as Vince said.
Reply
#8

Same Error
Reply
#9

EDIT: Nevermind

EDIT 2:
pawn Код:
forward FireTimer(playerid);
public FireTimer(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        RandomFireSpawn(playerid);
        KillTimer(TimerName);
    }
    return 1;
}
Use playerid instead of i in the public function. You also forgot a required semicolon in the forward.
Reply
#10

Same Error ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)