Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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