Auto Fire Spawn System Errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Auto Fire Spawn System Errors (
/showthread.php?tid=262226)
Auto Fire Spawn System Errors -
Robert_Crawford - 17.06.2011
Код:
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.
pawn Код:
new RandomFireSpawn
{X, Y, Z },
{X, Y, Z},
{X, Y, Z};//This is of the X, Y, Z of fire spawns.
forward timername;
pawn Код:
public TimerName()
{
for(new i =0;i<MAX_PLAYERS;i++)
if(IsPlayerConnected(i))
{
CreateObject(ObjectID, RandomFireSpawn[0], RandomFireSpawn[1], RandomFireSpawn[2],0, 0, 0, 0);
SetPlayerMapIcon(i, 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(i); // <- I have added a semi-colon at the end of this line
public HealthFire(i) // <- I have removed the semi-colon at the end of this line
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,5.0,RandomFireSpawn[0],RandomFireSpawn[1],RandomFireSpawn[2]))
{
FireHPTimer[i] = SetTimerEx("FireHealthTime", 25000, false, "i", i);//Set for 25 seconds.
}
}
return 1;
}
forward FireHealthTime(i); // <- I have added a semi-colon at the end of this line
public FireHealthTime(i)
{
if(IsPlayerConnected(i))
{
new Float:health;
GetPlayerHealth(i, health);
SetPlayerHealth(i, health-25.0);//In 25 seconds, if not treated he will loose 25 HP
}
return 1;
}
Re: Auto Fire Spawn System Errors -
Toreno - 17.06.2011
Replace and try this RandomFireSpawn.
pawn Код:
static Float:RandomFireSpawn[][3] = {
{X, Y, Z},
{X, Y, Z},
{X, Y, Z}
};
The second one, I think you didn't modify ObjectID, give me exactly line.
Re: Auto Fire Spawn System Errors -
Robert_Crawford - 17.06.2011
Код:
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(196) : error 001: expected token: "(", but found ";"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(198) : error 001: expected token: ")", but found "new"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(198) : error 001: expected token: ";", but found "new"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(977) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(977) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(977) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(978) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(978) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(978) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(979) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(979) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(979) : warning 213: tag mismatch
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(21672) : warning 217: loose indentation
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65834) : warning 235: public function lacks forward declaration (symbol "TimerName")
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65839) : error 017: undefined symbol "ObjectID"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65840) : error 017: undefined symbol "IConID"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65841) : error 017: undefined symbol "SendFactionMessage"
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65842) : error 076: syntax error in the expression, or invalid function call
C:\Users\Robert Crawford\Desktop\Vanity Role Play NEW!!!\gamemodes\prp.pwn(65854) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
8 Errors.
Line 65839
pawn Код:
CreateObject(ObjectID, RandomFireSpawn[0], RandomFireSpawn[1], RandomFireSpawn[2],0, 0, 0, 0);
Line 65840
pawn Код:
SetPlayerMapIcon(i, IConID, RandomFireSpawn[1],RandomFireSpawn[1],RandomFireSpawn[1], 55, COLOR_WHITE, 0);
The SendFactionMessage I understand