AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Can't compile this plugin (https://forums.alliedmods.net/showthread.php?t=333049)

strangeguy 06-16-2021 15:34

Can't compile this plugin
 
When I'm compiling this plugin it says me this: error 017: undefined symbol "id"


Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <csx>

#define PLUGIN "Godzina"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define FLAGA ADMIN_LEVEL_G
native get_user_kills(id)

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(1.0,"timer",_,_,_,"b")
}

public timer()
{       
        new Time[9]
        get_time("%H:%M:%S",Time,8)
        set_hudmessage(0, 255, 0, 0.7, 0.06, 0, 0.0, 1.2, 0.0, 0.0, 3)
        ShowSyncHudMsg(0,CreateHudSyncObj(),"[Forum: Hades-Zone.eu] ^n[Godzina: %s] ^n[Koniec mapy za: %d:%02d] ^n[Zabojstw: %d]",Time,(get_timeleft() / 60), (get_timeleft() % 60),get_user_kills(id))
}


MacL 06-16-2021 16:48

Re: Can't compile this plugin
 
Quote:

Originally Posted by strangeguy (Post 2750034)
When I'm compiling this plugin it says me this: error 017: undefined symbol "id"


Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <csx>

#define PLUGIN "Godzina"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define FLAGA ADMIN_LEVEL_G
native get_user_kills(id)

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(1.0,"timer",_,_,_,"b")
}

public timer()
{       
        new Time[9]
        get_time("%H:%M:%S",Time,8)
        set_hudmessage(0, 255, 0, 0.7, 0.06, 0, 0.0, 1.2, 0.0, 0.0, 3)
        ShowSyncHudMsg(0,CreateHudSyncObj(),"[Forum: Hades-Zone.eu] ^n[Godzina: %s] ^n[Koniec mapy za: %d:%02d] ^n[Zabojstw: %d]",Time,(get_timeleft() / 60), (get_timeleft() % 60),get_user_kills(id))
}


Quote:

Originally Posted by fysiks (Post 841953)
it's a global event so there is no "id" passed, afaik.

You'll have to use some kind of loop to execute the LOL code on all players present on the server.


deprale 06-18-2021 00:19

Re: Can't compile this plugin
 
Quote:

Originally Posted by strangeguy (Post 2750034)
When I'm compiling this plugin it says me this: error 017: undefined symbol "id"


Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <csx>

#define PLUGIN "Godzina"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define FLAGA ADMIN_LEVEL_G
native get_user_kills(id)

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(1.0,"timer",_,_,_,"b")
}

public timer(id)
{       
        new Time[9]
        get_time("%H:%M:%S",Time,8)
        set_hudmessage(0, 255, 0, 0.7, 0.06, 0, 0.0, 1.2, 0.0, 0.0, 3)
        ShowSyncHudMsg(0,CreateHudSyncObj(),"[Forum: Hades-Zone.eu] ^n[Godzina: %s] ^n[Koniec mapy za: %d:%02d] ^n[Zabojstw: %d]",Time,(get_timeleft() / 60), (get_timeleft() % 60),get_user_kills(id))
}


You don't need all these includes, and there's unused definition of FLAGA.

Code:

#include <amxmodx>

#define PLUGIN "Godzina"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
native get_user_kills(id)

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(1.0,"timer", 0,_,_,"b")
}

public timer(id)
{       
        new Time[9]
        get_time("%H:%M:%S",Time,8)
        set_hudmessage(0, 255, 0, 0.7, 0.06, 0, 0.0, 1.2, 0.0, 0.0, 3)
        ShowSyncHudMsg(0,CreateHudSyncObj(),"[Forum: Hades-Zone.eu] ^n[Godzina: %s] ^n[Koniec mapy za: %d:%02d] ^n[Zabojstw: %d]",Time,(get_timeleft() / 60), (get_timeleft() % 60),get_user_kills(id))
}


Barlap 06-20-2021 16:37

Re: Can't compile this plugin
 
Try to compile it here: IecGame Compiler
Code:

#include <amxmodx>

#define PLUGIN "Godzina"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
native get_user_kills(id)

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(1.0,"timer", 0,_,_,"b")
}

public timer(id)
{       
        new Time[9]
        get_time("%H:%M:%S",Time,8)
        set_hudmessage(0, 255, 0, 0.7, 0.06, 0, 0.0, 1.2, 0.0, 0.0, 3)
        ShowSyncHudMsg(0,CreateHudSyncObj(),"[Forum: Hades-Zone.eu] ^n[Godzina: %s] ^n[Koniec mapy za: %d:%02d] ^n[Zabojstw: %d]",Time,(get_timeleft() / 60), (get_timeleft() % 60),get_user_kills(id))
}


fysiks 06-20-2021 18:34

Re: Can't compile this plugin
 
Quote:

Originally Posted by Barlap (Post 2750547)
Try to compile it here: IecGame Compiler
Code:

#include <amxmodx>

#define PLUGIN "Godzina"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
native get_user_kills(id)

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(1.0,"timer", 0,_,_,"b")
}

public timer(id)
{       
        new Time[9]
        get_time("%H:%M:%S",Time,8)
        set_hudmessage(0, 255, 0, 0.7, 0.06, 0, 0.0, 1.2, 0.0, 0.0, 3)
        ShowSyncHudMsg(0,CreateHudSyncObj(),"[Forum: Hades-Zone.eu] ^n[Godzina: %s] ^n[Koniec mapy za: %d:%02d] ^n[Zabojstw: %d]",Time,(get_timeleft() / 60), (get_timeleft() % 60),get_user_kills(id))
}


Completely irrelevant, unnecessary, and people should never use random web compilers.

deprale 06-21-2021 21:47

Re: Can't compile this plugin
 
Quote:

Originally Posted by fysiks (Post 2750559)
Completely irrelevant, unnecessary, and people should never use random web compilers.

+ why the hell did he just copy paste the same thing I WROTE? Is he blind or pretending...


All times are GMT -4. The time now is 11:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.