#include <uf> is giving me 26 errors
#1

Hello everybody Well now my new problem is I need to use the function 'IsPlayerInArea' so i downloaded uf.inc (Useful Functions) but when i do
pawn Код:
#include <uf>
it gives me 26 errors straight away, and when I remove it it gives no errors & warnings.

These are my includes
pawn Код:
#include <a_samp>
#include <Dini>
#include <dudb>
26 Errors with #include <uf>
pawn Код:
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(43) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS")
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(459) : error 021: symbol already defined: "Time"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(464) : error 021: symbol already defined: "Time"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3475) : error 021: symbol already defined: "mktime"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3505) : error 021: symbol already defined: "ValidEmail"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3510) : error 021: symbol already defined: "Now"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3518) : error 021: symbol already defined: "HexToInt"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3541) : error 021: symbol already defined: "IntToHex"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3562) : error 021: symbol already defined: "StrToInt"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3567) : error 021: symbol already defined: "IntToStr"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3574) : error 021: symbol already defined: "trunc"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3579) : error 021: symbol already defined: "SetPlayerMoney"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3585) : error 021: symbol already defined: "fcopy"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3604) : error 021: symbol already defined: "fcopytextfile"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3625) : error 021: symbol already defined: "frename"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3654) : error 021: symbol already defined: "StripNewLine"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3675) : error 021: symbol already defined: "ret_memcpy"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3703) : error 021: symbol already defined: "copy"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3725) : error 021: symbol already defined: "delete"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3738) : error 021: symbol already defined: "set"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3749) : error 021: symbol already defined: "equal"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3761) : error 021: symbol already defined: "mod"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3766) : error 021: symbol already defined: "div"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3771) : error 021: symbol already defined: "num_hash"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3782) : error 021: symbol already defined: "hash"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3790) : error 021: symbol already defined: "strreplace"
C:\Archivos de programa\Rockstar Games\GTA San Andreas\SA-MP 0.3a\0.3a Server\pawno\include\uf.inc(3809) : error 021: symbol already defined: "strlower"

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

Its because every singe thing inside of the " _ " in the errors are in both your Include and Script. Delete them from one of them.
Reply
#3

Yes some functions wont work but if you need just a few you should try copy and paste the ones you want in your FS or GM because there are also good working things in there

EDIT: and whatever the above says
Reply
#4

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
Its because every singe thing inside of the " _ " in the errors are in both your Include and Script. Delete them from one of them.
What did you mean with inside the "_"?

@Boelie: i will try.
Reply
#5

-Bump please help I need this function ASAP
Reply
#6

Quote:
Originally Posted by admantis
Посмотреть сообщение
-Bump please help I need this function ASAP
Copy the function to your script then.

You don't have to include the whole uf.inc file if you need just one function.
Reply
#7

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
Copy the function to your script then.

You don't have to include the whole uf.inc file if you need just one function.
pawn Код:
stock IsPlayerInAnyArea(playerid) //By Gabriel "Larcius" Cordes
{
    if(IsPlayerConnected(playerid))
    {
        for(new i=0; i<MAX_AREAS; i++)
        {
            if(IsPlayerInArea(playerid, i))
            {
                return 1;
            }
        }
    }
    return 0;
}
IsPlayerInArea isn't a native function and I dont know how to use it
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=66300
Reply
#9

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
I cannot use that function without the uf.inc includes and if i try to include it in my script it gave 26 errors
Reply
#10

Use this function

pawn Код:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)