Raised This Month: $ Target: $400
 0% 

Error with a simple plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 12-31-2009 , 01:14   Error with a simple plugin
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "He-slap"
#define VERSION "1.0"
#define AUTHOR "r4nDoMz"

register_cvar("heslap_dmg""75")

public 
plugin_init() {
    
    
register_plugin(PLUGINVERSIONAUTHOR)
    
}

register_concmd("say /he","henade","1","Gives a nade, but slaps you")

public 
henade()
{
    new 
dmg get_cvar_num("heslap_dmg")
    
give_item(id,"weapon_hegrenade")
    
user_slap(id,dmg,0)

Wtf is wrong with the code? I know that give_item(id,"weapon_hegrenade")
is wrong but what do the other errors mean?

PHP Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// Heslap.sma
// C:\Documents and Settings\******\Desktop\compiler\Heslap.sma(8) : error 021: sy
mbol already defined"register_cvar"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(16) : error 021: s
ymbol already defined"register_concmd"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : error 017: u
ndefined symbol "give_item"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : warning 215:
 
expression has no effect
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : error 001: e
xpected token";"but found ")"
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : error 029: i
nvalid expressionassumed zero
// C:\Documents and Settings\*****\Desktop\compiler\Heslap.sma(21) : fatal error
107too many error messages on one line
//
// Compilation aborted.
// 6 Errors.
// Could not locate output file C:\Documents and Settings\*****\Desktop\compiler\
compiled\Heslap.amx (compile failed).
//
// Compilation Time: 0.19 sec
// ----------------------------------------

Press enter to exit ... 
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
 



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 04:08.


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