error 017: undefined symbol "NameTimer"
#1

When i compile a GM it gives me this error
pawn Код:
error 017: undefined symbol "NameTimer"
First time compiling the script Its just the sandard GM non edited
Reply
#2

Try:
pawn Код:
new NameTimer;
Reply
#3

Put this into your script

pawn Код:
public NameTimer()
{
    new Float:p1x, Float:p1y, Float:p1z;
    new Float:p2x, Float:p2y, Float:p2z;
    for(new i = 0;i < MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerPos(i,p1x,p1y,p1z);
            for(new q = 0;q < MAX_PLAYERS;q++)
            {
                if(IsPlayerConnected(q))
                {
                    GetPlayerPos(q,p2x,p2y,p2z);
                    if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)
                    {
                        ShowPlayerNameTagForPlayer(i,q,1);
                    }
                    else
                    {
                        ShowPlayerNameTagForPlayer(i,q,0);
                    }
                }
            }
        }
    }
}
Reply
#4

@Stigg
Then i get
pawn Код:
(24794) : error 012: invalid function call, not a valid address
and on line (24794) is:
pawn Код:
NameTimer();
and the only thing "NameTimer" is used is in:
pawn Код:
public CustomPickups()
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new string[128];
    NameTimer();
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerPos(i, oldposx, oldposy, oldposz);
            new tmpcar = GetPlayerVehicleID(i);
            if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
            {
                for(new h = 0; h < sizeof(SBizzInfo); h++)
                {
                    if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
                    {
                        format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]);
                        GameTextForPlayer(i, string, 5000, 3);
                        return 1;
                    }
                    if(PlayerToPoint(2.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
                    {
                        if(SBizzInfo[h][sbOwned] == 1)
                        {
                            format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~w~Level : %d ~n~to enter type /enter",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]);
                        }
                        else
                        {
                            format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~to buy this Business type /buybiz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
                        }
                        GameTextForPlayer(i, string, 5000, 3);
                        return 1;
                    }
                }
Reply
#5

@Mademan
Now i get
pawn Код:
(24803) : error 017: undefined symbol "GetPointDistanceToPointExMorph"
Reply
#6

Add this too

pawn Код:
Float:GetPointDistanceToPointExMorph(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2)
{
    new Float:x, Float:y, Float:z;
    x = x1-x2;
    y = y1-y2;
    z = z1-z2;
    return floatsqroot(x*x+y*y+z*z);
}
Reply
#7

Where do i add that? Just with the other but you gave me or just any where random.
Reply
#8

Somewhere outside callbacks
Reply
#9

Dear Deal-or-Die,

undefined symbol error means you don't have that function / variable / define.

If you don't have one, search first.
Reply
#10

This is, why we don't use gf edits right?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)