Raised This Month: $ Target: $400
 0% 

Public client_prethink compiling Error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Going Dutch
Member
Join Date: Dec 2013
Old 01-02-2014 , 17:21   Public client_prethink compiling Error
Reply With Quote #1

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!
__________________
Learning amxx/pawn and all that good stuff.

Last edited by Going Dutch; 01-02-2014 at 17:26.
Going Dutch is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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