Raised This Month: $51 Target: $400
 12% 

Error: Only a single statement (or expression) can follow each "case"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fanaticpeople
New Member
Join Date: Mar 2012
Old 03-14-2012 , 20:34   Error: Only a single statement (or expression) can follow each "case"
Reply With Quote #1

Hi , i need help with this eror
PHP Code:
ErrorOnly a single statement (or expressioncan follow each "case" on line 46 
SMA

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "VIP for BaseBuilder"
#define VERSION "1.0"
#define AUTHOR "FanatiK"


public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /vipshop","vip"
    
register_clcmd("say /vip","vip"
}

public 
menu(id)
{
    
    new 
menu
    menu 
menu_create("VIP Shop-1st plugin by FanatiK","menu_handle")
    
    
menu_additem(menu,"Viac zivota (+200)"
    
menu_display(idmenu)
}

public 
menu_handle(id,menu,item)

{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED 
    
}
    switch(
item)
    {
        case 
0:
        {
            new 
hp get_user_health(id)
            new 
vhp hp 100 
            set_user_health
(idvhp)
        } 
Thx for any help . I am total beginner in pawn scripting .

Last edited by fanaticpeople; 03-14-2012 at 20:37.
fanaticpeople is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-15-2012 , 00:05   Re: Error: Only a single statement (or expression) can follow each "case"
Reply With Quote #2

You are doing most everything correctly. The only reason you get that error is that you are not finished with the plugin. You need to close all the braces.

Oh, and you need a public function called "vip" because you have the chat commands linked to such a function.
__________________

Last edited by fysiks; 03-15-2012 at 00:15.
fysiks is offline
Reply



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 21:26.


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