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

[Request] Fix 1 simple error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eNNkds
Member
Join Date: Sep 2012
Location: Romania
Old 09-05-2017 , 15:21   [Request] Fix 1 simple error
Reply With Quote #1

Hello i have a small error in my plugin.
menu.sma(25) error 037: invalid string (possibly non-terminated string)
menu.sma(25 -- 26) : warning 215: expression has no effect

PHP Code:
#include <amxmodx>

static const
    
PLUGIN[] = "Comenzi",
    
VERSION[] = "1.0",
    
AUTHOR[] = "unknown";

public 
plugin_init() {
    
register_plugin(PLUGIN,VERSION,AUTHOR)
    
register_clcmd("chooseteam","cmdMenu")
}
public 
cmdMenu(id) {
    
menu(id)
    return 
1
}
public 
menu(id) {
    static 
menu
    menu 
menu_create("\wMain-Menu \y[\rBB\y]","menu_handler")

    
menu_additem(menu,"[Weapons]","1",0)
    
menu_additem(menu,"[Extra Items]","2",0)
    
menu_additem(menu,"[Zombie Classes]","3",0)
    
menu_additem(menu,"[Radio]","4",0)
    
menu_additem(menu,"[Boost]","5",0)
    
menu_additem(menu,"[Rules-Binds]",6",0)
    menu_setprop(menu,MPROP_NUMBER_COLOR,"
\r")
    menu_setprop(menu,MPROP_EXIT,MEXIT_ALL)
    
    menu_display (id,menu,0)
    return 0
}

public menu_handler(id,menu,item)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(menu)
        return 1
    }

    new data[6],szName[64]
    new access,callback
    
    menu_item_getinfo(menu,item,access,data,charsmax(data),szName,charsmax(szName),callback)
    
    new key = str_to_num(data)
    
    switch(key)
    {
        case 1: client_cmd(id,"
say /guns")
        case 2: client_cmd(id,"
say /shop")
        case 3: client_cmd(id,"
say /class")
        case 4: client_cmd(id,"
say /radio")
        case 5: client_cmd(id,"
say /boost")
        case 6: client_cmd(id,"
say /rules")
    }
    menu_destroy(menu)
    return 1

eNNkds is offline
Send a message via Skype™ to eNNkds
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 09-05-2017 , 15:26   Re: [Request] Fix 1 simple error
Reply With Quote #2

menu_additem(menu,"[Rules-Binds]",6",0)
->
menu_additem(menu,"[Rules-Binds]","6",0)
:p
__________________
Relaxing is offline
eNNkds
Member
Join Date: Sep 2012
Location: Romania
Old 09-05-2017 , 17:33   Re: [Request] Fix 1 simple error
Reply With Quote #3

i fixed it complied but when i use the plugin with BB mod 6.5 don't show the menu.. :-/
eNNkds is offline
Send a message via Skype™ to eNNkds
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 09-06-2017 , 06:26   Re: [Request] Fix 1 simple error
Reply With Quote #4

choosemenu func is used by basebuilder base plugin to show the zombie menu.
In plugin.ini, add the plugin's name on top of basebuilder65.amxx (or something)
__________________
Relaxing 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 04:12.


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