This compiles perfectly, but nothing shows up where the cvar's string should be. Not when I put it in server.cfg/amxx.cfg or change it manually. I dont know why. My guess is that the get_cvar_string can't global so it doesnt keep the cvars information.
The problematic code:
PHP Code:
#include <amxmodx>
#include <cstrike>
#define PLUGIN "Server Display"
#define VERSION "3.0"
#define AUTHOR "MoE | -hAbd-"
new website[29]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_cvar("sd_website", "awebsite");
get_cvar_string("sd_website", website, 28);
}
public client_putinserver()
{
set_task(1.0, "Displayhud", 551, _, _, "b");
}
public Displayhud()
{
set_hudmessage( 0, 255, 0, -1.0, 0.0, 0, 6.0, 12.0);
show_hudmessage(0, "Our Website : %s", website[28]);
}
My second query is my function headers sometime get errors. For example I'll get Error: Start of function body without function header on line -- and then Warning: Symbol is never used: "Displayhud" on line -- and it makes me incredibly annoyed =P So how do they work? Are their specific guidelines I'm not following? Is it just me and my program that are mentally the odd one out?
Thanks to all who help!!