I was making an capture zone but i was getting errors :(
#1

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
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)