SA-MP Forums Archive
Rank compile failure - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Rank compile failure (/showthread.php?tid=367198)



Rank compile failure - 5eloo - 09.08.2012

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);
	)



Respuesta: Rank compile failure - HarlemSAMP - 09.08.2012

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


Re: Rank compile failure - 5eloo - 09.08.2012

Код:
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.



Respuesta: Rank compile failure - HarlemSAMP - 09.08.2012

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


Re: Rank compile failure - 5eloo - 09.08.2012

That is the whole script , error


Re: Rank compile failure - Eminem 2ka9 - 09.08.2012

I added this to my script and it works! thanks


Re: Rank compile failure - 5eloo - 09.08.2012

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


Respuesta: Rank compile failure - HarlemSAMP - 09.08.2012

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;
}



Re: Respuesta: Rank compile failure - 5eloo - 09.08.2012

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


Respuesta: Rank compile failure - HarlemSAMP - 09.08.2012

No problem.