Raised This Month: $ Target: $400
 0% 

weapongiver generic errors (compiler error 088 and 017) [solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KneeGrow
Junior Member
Join Date: Mar 2014
Old 03-08-2014 , 16:05   weapongiver generic errors (compiler error 088 and 017) [solved]
Reply With Quote #1

What I wanted to do, after giving my first shot at pawn, was have a command that will give you a weapon if you enter in a certain number
e.g. amx_giveweapon <playername> 3 - you'll be given a magnum
I have compared this code to other people's code but I can't find the problem.
I wanted to use this code for Sven Coop

Code:
#include <amxmodx>
#include <fun>

#define PLUGIN "giveWeapon"
#define VERSION "1.0"
#define AUTHOR "KneeGrow"

public plugin_init(){
	register_plugin(PLUGIN,VERSION,AUTHOR);
	register_concmd("amx_giveweapon","giveWeapon",ADMIN_KICK,"<target> <weaponid> enter 0-4");
}
public giveWeapon(id,wid){
	if(wid==0){
		give_item(id,weapon_shotgun);
		return PLUGIN_HANDLED;
	} else if(wid==1){
		give_item(id,weapon_9mmhandgun);
		return PLUGIN_HANDLED;
	} else if(wid==2){
		give_item(id,weapon_mp5);
		return PLUGIN_HANDLED;
	} else if(wid==3){
		give_item(id,weapon_357);
		return PLUGIN_HANDLED;
	} else if(wid==4){
		give item(id,weapon_m249);
		return PLUGIN_HANDLED;
	} else {
		console_print(id,"out of range, 0-4 only");
	}
	return PLUGIN_HANDLED;
}
After compiling, if this matters to you guys, because I can't decipher this
weapongiver.sma(14) : error 017: undefined symbol "weapon_shotgun"
weapongiver.sma(14) : error 088: number of arguments does not match definition
weapongiver.sma(17) : error 017: undefined symbol "weapon_9mmhandgun"
weapongiver.sma(17) : error 088: number of arguments does not match definition
weapongiver.sma(20) : error 017: undefined symbol "weapon_mp5"
weapongiver.sma(20) : error 088: number of arguments does not match definition
weapongiver.sma(23) : error 017: undefined symbol "weapon_357"
weapongiver.sma(23) : error 088: number of arguments does not match definition
weapongiver.sma(26) : error 017: undefined symbol "give"
weapongiver.sma(26) : error 088: number of arguments does not match definition

Last edited by KneeGrow; 03-08-2014 at 17:08.
KneeGrow is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-08-2014 , 16:23   Re: weapongiver generic errors (undefined symbol....)
Reply With Quote #2

The weapon names are strings, not variables
You forgot an Underscore between give and item
__________________
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
KneeGrow
Junior Member
Join Date: Mar 2014
Old 03-08-2014 , 16:27   Re: weapongiver generic errors (compiler error 088 and 017)
Reply With Quote #3

ah good eye there,
I would have probably looked over the code for a long time and would have missed that :s


problem solved, thank you

Last edited by KneeGrow; 03-08-2014 at 16:28.
KneeGrow is offline
Reply


Thread Tools
Display Modes

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 06:02.


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