I was making an capture zone but i was getting 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)
+--- Thread: I was making an capture zone but i was getting errors :( (
/showthread.php?tid=396826)
I was making an capture zone but i was getting errors :( -
Mustafa6155 - 02.12.2012
Hello this are my Errors
Код:
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\BF.pwn(1228) : error 029: invalid expression, assumed zero
C:\Users\Mustafa\Desktop\SAmp SRV\ForYou\gamemodes\BF.pwn(1615) : error 021: symbol already defined: "udb_hash"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
this is where the errors are.
pawn Код:
stock udb_hash(buf[]) { //1615
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}// 1626
But i didnt defined
And the other one
pawn Код:
public OnPlayerEnterCheckpoint(playerid) // 122
{
if(IsPlayerInRangeOfPoint(playerid, 377.8304, -3175.7493, 2.9000, 353.5308))
}
SendClientMessage(playerid, RED, "U begint met het veroveren van deze capture plek!");
GangZoneFlashForAll(TEAM_ARMY, 0xFF80FF76); // Makes the turf Flash Pink ( telling everyone its being taken over )
GangZoneFlashForAll(TEAM_SWAT, 0xFF80FF76); // Makes the turf Flash Pink ( telling everyone its being taken over )
SendClientMessageToAll(0xFF80FFFF, "The gangzone is being taken over"); // Sending Message to all players.
timer = SetTimerEx("SetZone", 30000, false, "i", playerid); // Setting the Timer... ( 30 seconds )
Checkpoint[playerid] = 1; // Telling the variable that the player is in the checkpoint.
return 1;
} //1236
Re: I was making an capture zone but i was getting errors :( -
iggy1 - 02.12.2012
One of your includes will have the udb_hash function in it.
IsPlayerInRangeOfPoint needs to be passed the range you wish to check.
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
And last but not least, under
IsPlayerInRangeOfPoint you have a closing brace '}' but no opening brace.
EDIT: You actually passed a range to
IsPlayerInRangeOfPoint but i dont think you want that range.