AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help (Can't Compile plugin) (https://forums.alliedmods.net/showthread.php?t=192763)

Skatz 08-13-2012 21:24

Help (Can't Compile plugin)
 
Hello
Can someone where is the error in this plugin? I can't compile him :s (sorry foi my english)

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>


public plugin_init()
{
    
register_plugin("user menu""1.0","bfcb)
    register_clcmd( "
say /menu", "abrir_menu")
}

public abrir_menu(id,level,cid)
{
    if(!cmd_access(id,level,cid,1))
        return PLUGIN_HANDLED
        
    new Menu = menu_create("
\y[FightZone] - \rMenu", "mostrar_menu")
    menu_additem(Menu, "
\wConectar TeamSpeak", "1", 0)
    menu_additem(Menu, "
\wJogar Cobra", "2", 0)
    menu_additem(Menu, "
\wJogar Tetris", "3", 0)
    menu_additem(Menu, "
\wComprar VIP", "4", 0)  
    menu_additem(Menu, "
\wVantagens dos VIPS", "5", 0)
    menu_additem(Menu, "
\wReniciar o Score", "6",0)
    menu_setprop(Menu,MPROP_EXITNAME,"
Sair") 
    menu_display(id, Menu)
    return PLUGIN_HANDLED
}
public mostrar_menu(id, Menu, item)
{
    if(item == MENU_EXIT)
        return PLUGIN_HANDLED
    new iData[6];  
    new iAccess; 
    new iCallback; 
    new iName[64]; 
    menu_item_getinfo(Menu , item , iAccess , iData , 5 , iName, 63 , iCallback )
    
    switch (str_to_num(iData)) 
    { 
            case 1 : client_cmd(id, "
say ts3")
            case 2 : client_cmd(id, "
say cobra")
            case 3 : client_cmd(id, "
say tetris)
            case 
client_cmd(id"say /vip")
            case 
5client_cmd(id"say !vipinfo")
            case 
6client_cmd(id"say rs")
    }
    
    
menu_destroy(Menu)
    return 
PLUGIN_HANDLED 



Liverwiz 08-13-2012 22:14

Re: Help (Can't Compile plugin)
 
Code:

register_plugin("user menu", "1.0","bfcb)
:arrow:
PHP Code:

register_plugin("user menu""1.0","bfcb"

and
Code:

            case 3 : client_cmd(id, "say tetris)
:arrow:
PHP Code:

            case client_cmd(id"say tetris"

Don't forget to close your quotes.
Also...if that isn't all. Post the compilation errors you get.

Skatz 09-16-2012 13:06

Re: Help (Can't Compile plugin)
 
Big mistake, thank you!
Now I can compile but it doesnt work on server, can you tell me what is wrong with my plugin?
btw, sorry for my english

Liverwiz 09-16-2012 13:34

Re: Help (Can't Compile plugin)
 
check your error logs. Do they say anything?

fysiks 09-16-2012 13:58

Re: Help (Can't Compile plugin)
 
You can't just say "it doesn't work," you must explain exactly what doesn't work.

Skatz 09-16-2012 14:19

Re: Help (Can't Compile plugin)
 
I type /menu in my server and menu dosent open, can someone fix that?

fysiks 09-16-2012 14:29

Re: Help (Can't Compile plugin)
 
Quote:

Originally Posted by Skatz (Post 1800775)
I type /menu in my server and menu dosent open, can someone fix that?

Is the plugin running?

matsi 09-16-2012 14:58

Re: Help (Can't Compile plugin)
 
The plugin works just fine if its installed correctly.

Skatz 09-17-2012 17:05

Re: Help (Can't Compile plugin)
 
Yes is running
in my server doesnt work

fysiks 09-17-2012 19:28

Re: Help (Can't Compile plugin)
 
Quote:

Originally Posted by Skatz (Post 1801495)
Yes is running
in my server doesnt work

Then you need to provide more information. Attach the current .sma to your post. Also, show the output of the following command:
Code:

rcon amxx list


All times are GMT -4. The time now is 05:49.

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