AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Public client_prethink compiling Error (https://forums.alliedmods.net/showthread.php?t=232649)

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(PLUGINVERSIONAUTHOR)  
     
    
// 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_setpropmenuMPROP_EXITNAME"Close menu" 
    
menu_setprop(menuMPROP_EXITMEXIT_ALL ); 
    
menu_display(idmenu); 
}
public 
MenuW_Handler(idmenuitem)  

    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(idpev_button) & IN_RELOAD && !(pev(idpev_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!

fysiks 01-02-2014 17:57

Re: Public client_prethink compiling Error
 
Every opening brace must have a corresponding closing brace.

Going Dutch 01-02-2014 18:11

Re: Public client_prethink compiling Error
 
Ah yes, Thank you!


All times are GMT -4. The time now is 10:09.

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