0Admin.pwn(10852) : error 020: invalid symbol name "" - Lets try again
#1

Seems like moderators like deleting posts for the fun of it.

Error im getting
Код:
0Admin.pwn(10852) : error 020: invalid symbol name ""
Line of the error
Код:
else if(iTag == tagof(hex:) || iTag == tagof(Hex:))
Reply
#2

well its hard to know what the rest of your code looks like
i know you may not want to post it so I ask if youv read Slice's
post about Using tagof?

can be found here
http://forum.sa-mp.com/showthread.ph...901#post877901
Reply
#3

Heres the block of code around it
pawn Код:
stock
    FormatNumber(
    { _, Float, Text3D, Menu, Text, DB, DBResult, bool, File, hex, bit, bit_byte, Bit }:xVariable, iDecimals = -1, iThousandSeparator = ',', iDecimalPoint = '.', iTag = tagof(xVariable))
{
    static
        s_szReturn[32],
        s_szThousandSeparator[2] = { ' ', EOS },
        s_iDecimalPos,
        s_iChar,
        s_iSepPos
    ;

    if(iTag == tagof(bool:))
    {
        if(xVariable)
            memcpy(s_szReturn, "true", 0, 5 * (cellbits / 8));
        else
            memcpy(s_szReturn, "false", 0, 6 * (cellbits / 8));

        return s_szReturn;
    }
    else if(iTag == tagof(Float:))
    {
        if(iDecimals == -1)
            iDecimals = 8;

        format(s_szReturn, sizeof(s_szReturn), "%.*f", iDecimals, xVariable);
    }
    else if(iTag == tagof(hex:) || iTag == tagof(Hex:))
    {
        format(s_szReturn, sizeof(s_szReturn), "0x" "%04h%04h", (xVariable & (0xFFFF0000)) >>> 16, xVariable & (0x0000FFFF));

        return s_szReturn;
    }
    else if(iTag == tagof(bit:) || iTag == tagof(Bit:))
    {
        format(s_szReturn, sizeof(s_szReturn), "0b" "%08b%08b%08b%08b", (xVariable & 0xFF000000) >>> 24, (xVariable & 0x00FF0000) >>> 16, (xVariable & 0x0000FF00) >>> 8, (xVariable & 0x000000FF));

        return s_szReturn;
    }
    else if(iTag == tagof(bit_byte:))
    {
        format(s_szReturn, sizeof(s_szReturn), "0b" "%08b", (xVariable & 0x000000FF));

        return s_szReturn;
    }
    else
    {
        format(s_szReturn, sizeof(s_szReturn), "%d", xVariable);

        if(iDecimals > 0)
        {
            strcat(s_szReturn, ".");

            while (iDecimals--)
                strcat(s_szReturn, "0");
        }
    }

    s_iDecimalPos = strfind(s_szReturn, ".");

    if(s_iDecimalPos == -1)
        s_iDecimalPos = strlen(s_szReturn);
    else
        s_szReturn[s_iDecimalPos] = iDecimalPoint;

    if(s_iDecimalPos >= 4 && iThousandSeparator)
    {
        s_szThousandSeparator[0] = iThousandSeparator;

        s_iChar = s_iDecimalPos;
        s_iSepPos = 0;

        while (--s_iChar > 0)
        {
            if(++s_iSepPos == 3)
            {
                strins(s_szReturn, s_szThousandSeparator, s_iChar);

                s_iSepPos = 0;
            }
        }
    }
    return s_szReturn;
}
As im not very advanced at pawn scripting i dont want to mess around with the code
Reply
#4

Bump xD !!
Reply
#5

BUMP!!
Reply
#6

Bump?...
Reply
#7

~Bumping~ your thread actually diverts attention away from it
Reply
#8

thanks for your help..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)