Rank compile failure
#1

I wanted to make 3D labels but compiling failed idk why here is the script
Код:
#include <a_samp>
#include <zcmd>


#define GREEN 0x33AA33AA
#define WHITE 0xFFFFFFAA
#define YELLOW 0xF9FF00FF
#define RED 0xFB0000FF
#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print("Rank System by Sayko ");
        print("--------------------------------------\n");
        return 1;
}

main{}

#endif


public OnPlayerSpawn(playerid)
{
    if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 300)
    {
        new Text3D:label = Create3DTextLabel("Young Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 300 && GetPlayerScore(playerid) < 700)
    {
        new Text3D:label1 = Create3DTextLabel("Novice Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 700 && GetPlayerScore(playerid) < 3000)
    {
        new Text3D:label2 = Create3DTextLabel("Pro Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 3000 && GetPlayerScore(playerid) < 6000)
    {
        new Text3D:label3 = Create3DTextLabel("Immortal Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 6000 && GetPlayerScore(playerid) < 10000)
    {
        new Text3D:label4 = Create3DTextLabel("Rockstar Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 10000 && GetPlayerScore(playerid) < 20000)
    {
        new Text3D:label5 = Create3DTextLabel("Sayko Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label5, playerid, 0.0, 0.0, 0.4);
	)
Reply
#2

Show us the error lines from your compiler, we ain't magicians here
Reply
#3

Код:
F:\GTASAN~1\GTASA~1\samp\h.pwn(56) : warning 217: loose indentation
F:\GTASAN~1\GTASA~1\samp\h.pwn(56) : error 029: invalid expression, assumed zero
F:\GTASAN~1\GTASA~1\samp\h.pwn(56 -- 57) : warning 215: expression has no effect
F:\GTASAN~1\GTASA~1\samp\h.pwn(57) : error 001: expected token: ";", but found "-end of file-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#4

Can you show me the full code? can't see if you closed the callback.
Reply
#5

That is the whole script , error
Reply
#6

I added this to my script and it works! thanks
Reply
#7

Quote:
Originally Posted by Eminem 2ka9
Посмотреть сообщение
I added this to my script and it works! thanks
Np brah
Reply
#8

Here it is, compiled with 0 warning or errors, at the last line you set up ")" instead of "}" and you didn't close your callback.

pawn Код:
#include <a_samp>
#include <zcmd>


#define GREEN 0x33AA33AA
#define WHITE 0xFFFFFFAA
#define YELLOW 0xF9FF00FF
#define RED 0xFB0000FF
#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print("Rank System by Sayko ");
        print("--------------------------------------\n");
        return 1;
}

main{}

#endif


public OnPlayerSpawn(playerid)
{
    if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 300)
    {
        new Text3D:label = Create3DTextLabel("Young Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 300 && GetPlayerScore(playerid) < 700)
    {
        new Text3D:label1 = Create3DTextLabel("Novice Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 700 && GetPlayerScore(playerid) < 3000)
    {
        new Text3D:label2 = Create3DTextLabel("Pro Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 3000 && GetPlayerScore(playerid) < 6000)
    {
        new Text3D:label3 = Create3DTextLabel("Immortal Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 6000 && GetPlayerScore(playerid) < 10000)
    {
        new Text3D:label4 = Create3DTextLabel("Rockstar Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 10000 && GetPlayerScore(playerid) < 20000)
    {
        new Text3D:label5 = Create3DTextLabel("Sayko Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label5, playerid, 0.0, 0.0, 0.4);
    }
    return 1;
}
Reply
#9

Quote:
Originally Posted by HarlemSAMP
Посмотреть сообщение
Here it is, compiled with 0 warning or errors, at the last line you set up ")" instead of "}" and you didn't close your callback.

pawn Код:
#include <a_samp>
#include <zcmd>


#define GREEN 0x33AA33AA
#define WHITE 0xFFFFFFAA
#define YELLOW 0xF9FF00FF
#define RED 0xFB0000FF
#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print("Rank System by Sayko ");
        print("--------------------------------------\n");
        return 1;
}

main{}

#endif


public OnPlayerSpawn(playerid)
{
    if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 300)
    {
        new Text3D:label = Create3DTextLabel("Young Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 300 && GetPlayerScore(playerid) < 700)
    {
        new Text3D:label1 = Create3DTextLabel("Novice Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 700 && GetPlayerScore(playerid) < 3000)
    {
        new Text3D:label2 = Create3DTextLabel("Pro Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 3000 && GetPlayerScore(playerid) < 6000)
    {
        new Text3D:label3 = Create3DTextLabel("Immortal Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 6000 && GetPlayerScore(playerid) < 10000)
    {
        new Text3D:label4 = Create3DTextLabel("Rockstar Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 10000 && GetPlayerScore(playerid) < 20000)
    {
        new Text3D:label5 = Create3DTextLabel("Sayko Killa'",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label5, playerid, 0.0, 0.0, 0.4);
    }
    return 1;
}
Thanks
Reply
#10

No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)