AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   compiling problem (https://forums.alliedmods.net/showthread.php?t=64604)

tiktok51 12-19-2007 08:40

compiling problem
 
1 Attachment(s)
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:

TheRadiance 12-19-2007 09:12

Re: compiling problem
 
I compiled it without any problems. No errors.

here it is.

gl

s0upnazi 12-19-2007 21:12

Re: compiling problem
 
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.

TheRadiance 12-20-2007 07:05

Re: compiling problem
 
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

twinn_aces 12-21-2007 18:57

Re: compiling problem
 
1 Attachment(s)
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

twinn_aces 12-21-2007 19:01

Re: compiling problem
 
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 12-21-2007 19:16

Re: compiling problem
 
PLEASE

Arkshine 12-21-2007 19:27

Re: compiling problem
 
"misc/unstoppable_ultimate");

->

"misc/unstoppable_ultimate"};


All times are GMT -4. The time now is 11:04.

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