Raised This Month: $ Target: $400
 0% 

What is wrong?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pacheco
Senior Member
Join Date: Jul 2011
Old 08-12-2012 , 14:29   What is wrong?
Reply With Quote #1

Code:
8/12/2012 - 15:24:19: [AMXX] Displaying debug trace (plugin "**.amxx")
08/12/2012 - 15:24:19: [AMXX] Run time error 10: native error (native "show_menu")
08/12/2012 - 15:24:19: [AMXX] [0] **.sma::menuEdit (line 839)
PHP Code:

const KEYS_MANG MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_0

public plugin_init()
    
register_menu("Manager Menu"KEYSMENU"menu_manager");

public 
menuEdit(id)
{
[...]

     
show_menu(idKEYS_MANGmenu, -1"Manager Menu")

__________________




Last edited by pacheco; 08-15-2012 at 11:55.
pacheco is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-12-2012 , 14:30   Re: What is wrong?
Reply With Quote #2

Full code and error please
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
pacheco
Senior Member
Join Date: Jul 2011
Old 08-12-2012 , 14:49   Re: What is wrong?
Reply With Quote #3

Ok, here is one part of the code

PHP Code:
#include <amxmodx>
#include <amxmisc>

const KEYS_MANG MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_0

public plugin_init()
{
    
register_menu("Manager Menu"KEYS_MANG"menu_manager")

    
register_clcmd("say /admin""menuEdit");
}

public 
menuEdit(id)
{
    if(
get_user_flags(id) & ADMIN_BAN)
    {
        new 
stName[33]
        
get_user_name(idstName32)

        static 
menu[2100], len;
        
len 0

        len 
+= formatex(menu[len], charsmax(menu) - len"\r[ADMIN MENU]:")
    
        
len += formatex(menu[len], charsmax(menu) - len"^n^n\w Nick: \d%s^n"stName)
        
len += formatex(menu[len], charsmax(menu) - len"\r1. \wAdd Points^n")
        
len += formatex(menu[len], charsmax(menu) - len"\r2. \wRemove Points^n")
        
len += formatex(menu[len], charsmax(menu) - len"\r3. \wChange Level^n")
        
len += formatex(menu[len], charsmax(menu) - len"\r4. \wReset Account^n^n")

        
len += formatex(menu[len], charsmax(menu) - len"\r0. \wExit")
        
show_menu(idKEYS_MANGmenu, -1"Manager Menu"// Here is the problem?
    
}
}

public 
menu_manager(idkey)
{
    switch (
key)
    {
        case 
0add_pt(id);
        case 
1remove_pt(id);
        case 
2change_lvl(id);
        case 
3reset_acc(id);
    }

In the server console show this:
Code:
8/12/2012 - 15:24:19: [AMXX] Displaying debug trace (plugin "**.amxx")
08/12/2012 - 15:24:19: [AMXX] Run time error 10: native error (native "show_menu")
08/12/2012 - 15:24:19: [AMXX] [0] **.sma::menuEdit (line 839)
And the menu doesn't appears to me!
__________________




Last edited by pacheco; 08-12-2012 at 14:52.
pacheco is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-12-2012 , 18:11   Re: What is wrong?
Reply With Quote #4

Quote:
Originally Posted by YamiKaitou View Post
Full code and [full] error please
__________________
fysiks is offline
Ef_Deas
Member
Join Date: Aug 2012
Location: Rio de Janeiro
Old 08-12-2012 , 19:35   Re: What is wrong?
Reply With Quote #5

PHP Code:
formatex(menu[len],...) 
=>
PHP Code:
formatex(menu,...) 
Ef_Deas is offline
Send a message via Skype™ to Ef_Deas
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-12-2012 , 19:36   Re: What is wrong?
Reply With Quote #6

Quote:
Originally Posted by Ef_Deas View Post
PHP Code:
formatex(menu[len],...) 
=>
PHP Code:
formatex(menu,...) 
No.
__________________
fysiks is offline
Ef_Deas
Member
Join Date: Aug 2012
Location: Rio de Janeiro
Old 08-12-2012 , 19:39   Re: What is wrong?
Reply With Quote #7

Well, I'm not sure that's the reason of the error, but isn't it wrong?

Last edited by Ef_Deas; 08-12-2012 at 19:40.
Ef_Deas is offline
Send a message via Skype™ to Ef_Deas
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-12-2012 , 19:41   Re: What is wrong?
Reply With Quote #8

Quote:
Originally Posted by Ef_Deas View Post
Well, I'm not sure that's the reason of the error, but isn't it wrong?
No.
__________________
fysiks is offline
Ef_Deas
Member
Join Date: Aug 2012
Location: Rio de Janeiro
Old 08-12-2012 , 19:55   Re: What is wrong?
Reply With Quote #9

Sorry for that, I don't know why I thought it was wrong )
menu[len] is like a pointer of a string, so it's ok...
Ef_Deas is offline
Send a message via Skype™ to Ef_Deas
pacheco
Senior Member
Join Date: Jul 2011
Old 08-14-2012 , 20:20   Re: What is wrong?
Reply With Quote #10

@Ef_Deas:
Thanks for tried to help me.

@fysiks:
Sorry, but it's a private plugin.. =/

So, if someone can tell me if have one thing wrong in this code..
I just have one error,
Quote:
[AMXX] Run time error 10: native error (native "show_menu")
__________________




Last edited by pacheco; 08-14-2012 at 20:21.
pacheco 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 05:45.


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