| Going Dutch |
01-02-2014 17:21 |
Public client_prethink compiling Error
Hi,
First of all i'm sorry for posting two threads today but i really couldn't figure this error out.
I was hoping some of you could help me with this; but if this error is complete nonsense i apologize, i'm still learning.
When you press the Reload key it should open up the menu.
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#define PLUGIN "Weapons Menu"
#define VERSION "1.0"
#define AUTHOR "Asafmazon."
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
register_clcmd("say /menu", "MenuW");
register_clcmd("say /weapon", "WeaponsMenu");
register_clcmd("say /respawn", "RespawnMenu");
register_clcmd("say /admins", "AdminsMenu");
register_clcmd("say /info", "ShowMotd");
}
public MenuW(id)
{
new menu = menu_create("\wServer \wMenu", "MenuW_Handler" );
menu_additem(menu, "Blockmaker Menu", "", ADMIN_ADMIN);
menu_additem(menu, "XP Shop", "", 0);
menu_additem(menu, "Admin Menu", "", ADMIN_ADMIN);
menu_additem(menu, "Information", "", 0);
menu_additem(menu, "Admins online", "", 0);
menu_setprop( menu, MPROP_EXITNAME, "Close menu" )
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL );
menu_display(id, menu, 0 );
}
public MenuW_Handler(id, menu, item)
{
switch(item)
{
case 0:
{
client_cmd(id, "say /bm")
}
case 1:
{
client_cmd(id, "say /xp")
}
case 2:
{
client_cmd(id, "amxmodmenu")
}
case 3:
{
show_motd(id, "motd.txt");
}
case 4:
{
client_cmd(id, "say /admins")
}
public client_PreThink(id)
{
if (pev(id, pev_button) & IN_RELOAD && !(pev(id, pev_oldbuttons) & IN_RELOAD))
{
MenuW(id);
}
}
The compiling error:
Quote:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team
Error: Only a single statement (or expression) can follow each "case" on line 63
Error: Function "client_PreThink" is not implemented on line 63
Error: Expected token: "}", but found "-end of file-" on line 69
3 Errors.
Could not locate output file C:\Users\Jeroen\Desktop\weaponmenu.amx (compile failed).
|
Thanks in advance!
|