Raised This Month: $ Target: $400
 0% 

compiling problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tiktok51
Member
Join Date: Dec 2007
Old 12-19-2007 , 08:40   compiling problem
Reply With Quote #1

can some one plz compile this code because i cant compile it it gives me an error: number of arguments does not mach definition. so i need ur help here is the code:
Quote:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fun>

#define VERSION "1.0"

new const menu_names[][]=
{
"AWP",
"AK 47",
"M4 A1",
"The TMP !!"
}
new const menu_guns[][]=
{
"weapon_awp",
"weapon_ak47",
"weapon_m4a1",
"weapon_tmp"
}
public plugin_init()
{
register_plugin("Free Admin Guns", VERSION, "Pixie")
register_cvar("pixie","1.0",FCVAR_SERVER)
register_cvar("pixie_admin_guns_version",VERSION,FCVAR_SERVER)
register_clcmd("gunlist","admin_guns")
}
public admin_guns(id,level,cid)
{
new menu_id = menu_create("Guns Menu","on_choosegun") ;
for ( new i ; i < sizeof menu_names ; i ++ )
{
menu_additem(menu_id,menu_names[i])
}

menu_display(id,menu_id) ;

return PLUGIN_HANDLED_MAIN ;
}
public on_choosegun(id,menu_id,key)
{
if ( key != MENU_EXIT )
{
give_item(id,menu_guns[key])
}
menu_destroy(menu_id)
return PLUGIN_HANDLED ;
}
here is the .sma file:
Attached Files
File Type: sma Get Plugin or Get Source (admin_guns.sma - 565 views - 1.2 KB)
tiktok51 is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 12-19-2007 , 09:12   Re: compiling problem
Reply With Quote #2

I compiled it without any problems. No errors.

here it is.

gl

Last edited by TheRadiance; 03-16-2009 at 10:53.
TheRadiance is offline
Send a message via ICQ to TheRadiance
s0upnazi
Member
Join Date: Mar 2006
Old 12-19-2007 , 21:12   Re: compiling problem
Reply With Quote #3

Using the compiler on the site you get an error on line 35 regarding the function: menu_display

It has 3 arguments to input menu_display(id,menu,page)

In your current code you are missing the bolded part. Not sure on why it compiled for someone else on studio which made me a bit hesitant to repond to this so don't take my word as 100% accurate.
__________________
7h1$ 1$ 4n 3x4mp£3 0ƒ £337 47 17$ ƒ1n3$7. 1 w1££ 74|{3 7h1$ 0pp3r7µn17¥ 70 r3m1nÐ ¥0µ 7h47 ¥0µ $h0µ£Ð 4£w4¥$ 937 ¥0µr |{1Ð$ p37 $p4¥3Ð 0r n3µ7r3Ð. N3v3r £34v3 h0m3 w17h0µ7 4 70w3£. 4nÐ n0 m4773r wh47 7h3¥ $4¥, 7h3r3 1$ n0 ([]\/\/ |_3\/3|_. What Doesn't Wikipedia Have?
s0upnazi is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 12-20-2007 , 07:05   Re: compiling problem
Reply With Quote #4

Quote:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#define VERSION "1.0"
new const menu_names[][]=
{
"AWP",
"AK 47",
"M4 A1",
"The TMP !!"
}
new const menu_guns[][]=
{
"weapon_awp",
"weapon_ak47",
"weapon_m4a1",
"weapon_tmp"
}
public plugin_init()
{
register_plugin("Free Admin Guns", VERSION, "Pixie")
register_cvar("pixie","1.0",FCVAR_SERVER)
register_cvar("pixie_admin_guns_version",VERS ION,FCVAR_SERVER)
register_clcmd("gunlist","admin_guns")
}
public admin_guns(id,level,cid)
{
new menu_id = menu_create("Guns Menu","on_choosegun") ;
for ( new i ; i < sizeof menu_names ; i ++ )
{
menu_additem(menu_id,menu_names[i])
}
menu_display(id,menu_id,0) ;
return PLUGIN_HANDLED_MAIN ;
}
public on_choosegun(id,menu_id,key)
{
if ( key != MENU_EXIT )
{
give_item(id,menu_guns[key])
}
menu_destroy(menu_id)
return PLUGIN_HANDLED ;
}
line 37 should contain

Quote:
menu_display(id,menu_id,0) ;
0 = page
TheRadiance is offline
Send a message via ICQ to TheRadiance
twinn_aces
Junior Member
Join Date: Nov 2007
Old 12-21-2007 , 18:57   Re: compiling problem
Reply With Quote #5

I cant compile my stuff either. bunch off errors cant find amxxsh or plugins.ini bla bla. and im from Swe. sooo my english is really bad. cant understad everything in help me files or tutorials...


SOO!

If someone could be nice and make my .sma file to an amxx file i would be forever greatful.. for those who know what theyr doing. this would prob take 30 secs. so someone PLEASE.....

ive added the sma file in attatchments. please someone. compile it to an amxx file for me..

Im begging
Attached Files
File Type: sma Get Plugin or Get Source (ultimate_sound.sma - 153 views - 14.0 KB)

Last edited by twinn_aces; 12-21-2007 at 19:04.
twinn_aces is offline
twinn_aces
Junior Member
Join Date: Nov 2007
Old 12-21-2007 , 19:01   Re: compiling problem
Reply With Quote #6

Ive added and edited the sma file so that i can use other sounds etc.. When i try to "get Plugin" im gettin this error msg.

Welcome to the AMX Mod X 1.76-300 Compiler.Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team/home/groups/alliedmodders/forums/files/3/2/7/9/3/22258.attach(72) : error 001: expected token: "}", but found ")"1 Error.Could not locate output file /home/groups/amxmodx/public_html/compiled3/22258.amx (compile failed). What does that mean. so please if someone can make the sma file to an amx file for me....
twinn_aces is offline
twinn_aces
Junior Member
Join Date: Nov 2007
Old 12-21-2007 , 19:16   Re: compiling problem
Reply With Quote #7

PLEASE
twinn_aces is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-21-2007 , 19:27   Re: compiling problem
Reply With Quote #8

"misc/unstoppable_ultimate");

->

"misc/unstoppable_ultimate"};
__________________
Arkshine 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 11:04.


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