Fire Systeme Isuse need a help -
BigBaws - 21.02.2012
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.
Re: Fire Systeme Isuse need a help -
austin070 - 21.02.2012
Show us the function..
Re: Fire Systeme Isuse need a help -
Vince - 21.02.2012
We're not mind readers, you know ... Post the code that triggers the error.
Re : Fire Systeme Isuse need a help -
BigBaws - 21.02.2012
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;
}
Re: Fire Systeme Isuse need a help -
Vince - 21.02.2012
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.
Re : Fire Systeme Isuse need a help -
BigBaws - 21.02.2012
Where do i fix it vince & thanks a lot for more explaining me
Re: Fire Systeme Isuse need a help -
austin070 - 21.02.2012
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.
Re : Fire Systeme Isuse need a help -
BigBaws - 21.02.2012
Same Error
Re: Fire Systeme Isuse need a help -
austin070 - 21.02.2012
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.
Re : Fire Systeme Isuse need a help -
BigBaws - 21.02.2012
Same Error ...