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

compiling issues on weapon menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 11-15-2008 , 08:57   compiling issues on weapon menu
Reply With Quote #1

Starting the first stages of a new mod and already running into some compiling problems? /home/groups/amxmodx/tmp3/phpgG6UOY.sma(25) : error 017: undefined symbol "id" /home/groups/amxmodx/tmp3/phpgG6UOY.sma(25) : warning 217: loose indentation /home/groups/amxmodx/tmp3/phpgG6UOY.sma(25) : error 029: invalid expression, assumed zero /home/groups/amxmodx/tmp3/phpgG6UOY.sma(25) : warning 215: expression has no effect /home/groups/amxmodx/tmp3/phpgG6UOY.sma(25) : error 001: expected token: ";", but found ")" /home/groups/amxmodx/tmp3/phpgG6UOY.sma(25) : fatal error 107: too many error messages on one line
Code:
 /* Plugin generated by AMXX-Studio */  #include  #include  #include  #include  #include   #define PLUGIN "ChickenMOD: Pandemic" #define VERSION "1.0" #define AUTHOR "PvtSmithFSSF"   public plugin_init()  {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd( "/new","gunmenu")     register_clcmd( "/guns","gunmenu")     RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) }  public fwHamPlayerSpawnPost(iPlayer)  {     if (is_user_alive(iPlayer))          menu_display(id, gunmenu, 0) }   public gunmenu(id) {     new gunmenu = menu_create("\rChoose A Pistol:", "gunmenu_handler")     menu_additem(gunmenu, "\wUSP", "1", 0)     menu_additem(gunmenu, "\wDeagle", "2", 0)     menu_additem(gunmenu, "\wGlock", "3", 0)     menu_additem(gunmenu, "\wElites", "4", 0)     menu_setprop(gunmenu, MPROP_EXIT, MEXIT_ALL)     menu_display(id, gunmenu, 0) }  public gunmenu_handler(id, gunmenu, item) {     if (item == MENU_EXIT)     {         menu_destroy(gunmenu)         return PLUGIN_HANDLED     }          new data[6], iName[64]     new access, callback     menu_item_getinfo(gunmenu, item, access, data,5, iName, 63, callback)     new key = str_to_num(data)     switch(key)     {         case 1:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a USP.")             give_item(id, "weapon_usp")             menu_display(id, gunmenu2, 0)         }         case 2:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a Deagle.")             give_item(id, "weapon_deagle")             menu_display(id, gunmenu2, 0)         }         case 3:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a Glock.")             give_item(id, "weapon_glock18")             menu_display(id, gunmenu2, 0)         }         case 4:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved Dual Elites.")             give_item(id, "weapon_elite")             menu_display(id, gunmenu2, 0)         }     }           menu_destroy(gunmenu)     return PLUGIN_HANDLED }  public gunmenu2(id) {     new gunmenu2 = menu_create("\rChoose A Primary:", "gunmenu2_handler")     menu_additem(gunmenu2, "\wM4A1", "1", 0)     menu_additem(gunmenu2, "\wAK47", "2", 0)     menu_additem(gunmenu2, "\wFAMAS", "3", 0)     menu_additem(gunmenu2, "\wGALIL", "4", 0)     menu_additem(gunmenu2, "\wBULLPUP", "5", 0)     menu_additem(gunmenu2, "\wKREIG", "6", 0)     menu_additem(gunmenu2, "\wAWP", "7", 0)     menu_setprop(gunmenu2, MPROP_EXIT, MEXIT_ALL)     menu_display(id, gunmenu2, 0) }  public gunmenu2_handler(id, gunmenu2, item) {     if (item == MENU_EXIT)     {         menu_destroy(gunmenu2)         return PLUGIN_HANDLED     }          new data[6], iName[64]     new access, callback     menu_item_getinfo(gunmenu2, item, access, data,5, iName, 63, callback)     new key = str_to_num(data)     switch(key)     {         case 1:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved an M4A1.")             give_item(id, "weapon_m4a1")             menu_destroy(gunmenu2)             return PLUGIN_HANDLED         }         case 2:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved an AK47.")             give_item(id, "weapon_ak47")             menu_destroy(gunmenu2)             return PLUGIN_HANDLED         }         case 3:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a FAMAS.")             give_item(id, "weapon_famas")             menu_destroy(gunmenu2)             return PLUGIN_HANDLED         }         case 4:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a GALIL.")             give_item(id, "weapon_galil")             menu_destroy(gunmenu2)             return PLUGIN_HANDLED         }         case 5:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a BULLPUP.")             give_item(id, "weapon_bullpup")             menu_destroy(gunmenu2)             return PLUGIN_HANDLED         }         case 6:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a KREIG")             give_item(id, "weapon_sg552")             menu_destroy(gunmenu2)             return PLUGIN_HANDLED         }         case 7:         {             client_print(id, print_chat, "[CM:Pandemic] You've Recieved a AWP")             give_item(id, "weapon_awp")             menu_destroy(gunmenu2)             return PLUGIN_HANDLED         }     }           menu_destroy(gunmenu2)     return PLUGIN_HANDLED }
stupid code tags not working - here's link to pastebin post http://pastebin.com/m1f970c1

Last edited by PvtSmithFSSF; 11-15-2008 at 10:23.
PvtSmithFSSF is offline
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 11-15-2008 , 08:58   Re: compiling issues on weapon menu
Reply With Quote #2

What the hell I'm not sure why the code box is one line :O - My computer is being f*cking weird whenever I make a new line it shows up on the same line...

Last edited by PvtSmithFSSF; 11-15-2008 at 09:01.
PvtSmithFSSF is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-15-2008 , 09:23   Re: compiling issues on weapon menu
Reply With Quote #3

I see the same thing than you.

Try to chante tag, like [php] or [small].
__________________
Arkshine is offline
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 11-15-2008 , 10:20   Re: compiling issues on weapon menu
Reply With Quote #4

But it's not even like only in the code even if i just paste code normally its all on one line :\ For example I will now type "The" and then on a new line "Cat" The Cat It changes back........................... ..............I added pastebin -------------------- PS: It's only this forum it happens to me on - my other forums its fine

Last edited by PvtSmithFSSF; 11-15-2008 at 10:23.
PvtSmithFSSF is offline
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 11-15-2008 , 13:29   Re: compiling issues on weapon menu
Reply With Quote #5

No thoughts?
PvtSmithFSSF is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 11-15-2008 , 13:56   Re: compiling issues on weapon menu
Reply With Quote #6

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

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

#define PLUGIN "ChickenMOD: Pandemic"
#define VERSION "1.0"
#define AUTHOR "PvtSmithFSSF"

new gunmenu_handle
new gunmenu2_handle

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"/new","gunmenu")
    
register_clcmd"/guns","gunmenu")
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}

public 
fwHamPlayerSpawnPost(iPlayer
{
    if (
is_user_alive(iPlayer)) 
        
menu_display(iPlayergunmenu_handle 0)


public 
gunmenu(id)
{
    
gunmenu_handle menu_create("\rChoose A Pistol:""gunmenu_handler")
    
menu_additem(gunmenu_handle "\wUSP""1"0)
    
menu_additem(gunmenu_handle "\wDeagle""2"0)
    
menu_additem(gunmenu_handle "\wGlock""3"0)
    
menu_additem(gunmenu_handle "\wElites""4"0)
    
menu_setprop(gunmenu_handle MPROP_EXITMEXIT_ALL)
    
menu_display(idgunmenu_handle 0)
}

public 
gunmenu_handler(idgunmenu_handleitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(gunmenu_handle)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(gunmenu_handleitemaccessdata,5iName63callback)
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a USP.")
            
give_item(id"weapon_usp")
            
menu_display(idgunmenu2_handle0)
        }
        case 
2:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a Deagle.")
            
give_item(id"weapon_deagle")
            
menu_display(idgunmenu2_handle0)
        }
        case 
3:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a Glock.")
            
give_item(id"weapon_glock18")
            
menu_display(idgunmenu2_handle0)
        }
        case 
4:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved Dual Elites.")
            
give_item(id"weapon_elite")
            
menu_display(idgunmenu2_handle0)
        }
    }
    
    
    
menu_destroy(gunmenu_handle)
    return 
PLUGIN_HANDLED
}

public 
gunmenu2(id)
{
    new 
gunmenu2_handle menu_create("\rChoose A Primary:""gunmenu2_handler")
    
menu_additem(gunmenu2_handle"\wM4A1""1"0)
    
menu_additem(gunmenu2_handle"\wAK47""2"0)
    
menu_additem(gunmenu2_handle"\wFAMAS""3"0)
    
menu_additem(gunmenu2_handle"\wGALIL""4"0)
    
menu_additem(gunmenu2_handle"\wBULLPUP""5"0)
    
menu_additem(gunmenu2_handle"\wKREIG""6"0)
    
menu_additem(gunmenu2_handle"\wAWP""7"0)
    
menu_setprop(gunmenu2_handleMPROP_EXITMEXIT_ALL)
    
menu_display(idgunmenu2_handle0)
}

public 
gunmenu2_handler(idgunmenu2_handleitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(gunmenu2_handle)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(gunmenu2_handleitemaccessdata,5iName63callback)
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved an M4A1.")
            
give_item(id"weapon_m4a1")
            
menu_destroy(gunmenu2_handle)
            return 
PLUGIN_HANDLED
        
}
        case 
2:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved an AK47.")
            
give_item(id"weapon_ak47")
            
menu_destroy(gunmenu2_handle)
            return 
PLUGIN_HANDLED
        
}
        case 
3:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a FAMAS.")
            
give_item(id"weapon_famas")
            
menu_destroy(gunmenu2_handle)
            return 
PLUGIN_HANDLED
        
}
        case 
4:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a GALIL.")
            
give_item(id"weapon_galil")
            
menu_destroy(gunmenu2_handle)
            return 
PLUGIN_HANDLED
        
}
        case 
5:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a BULLPUP.")
            
give_item(id"weapon_bullpup")
            
menu_destroy(gunmenu2_handle)
            return 
PLUGIN_HANDLED
        
}
        case 
6:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a KREIG")
            
give_item(id"weapon_sg552")
            
menu_destroy(gunmenu2_handle)
            return 
PLUGIN_HANDLED
        
}
        case 
7:
        {
            
client_print(idprint_chat"[CM:Pandemic] You've Recieved a AWP")
            
give_item(id"weapon_awp")
            
menu_destroy(gunmenu2_handle)
            return 
PLUGIN_HANDLED
        
}
    }
    
    
    
menu_destroy(gunmenu2_handle)
    return 
PLUGIN_HANDLED

Try this.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
PvtSmithFSSF
Senior Member
Join Date: Jul 2008
Old 11-15-2008 , 17:42   Re: compiling issues on weapon menu
Reply With Quote #7

thanks bro, compiles fine
PvtSmithFSSF 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 02:10.


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