Raised This Month: $12 Target: $400
 3% 

Compile Errors - Code Cleanup


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 03-08-2007 , 20:31   Compile Errors - Code Cleanup
Reply With Quote #1

I'm getting errors while compling my code over the webcompiler. Will somebody clean this up for me?
CODE:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>

#define PLUGIN "SvenCoop - Minigun Powers"
#define VERSION "1.0"
#define AUTHOR "FormulaZero"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("CurWeapon""weaponminigun""be")
}

public 
weaponminigun(id)
{
    if (
user_has_weapon(idSCW_MINIGUN){
        
set_user_maxspeed(id300.1)
         
set_user_gravity(id1.5)
        
client_print(idprint_center"You can now jump while using the minigun.")
        return 
PLUGIN_HANDLED
}

public 
client_putinserver(id)
{
    
    
set_task(3.0"welcome"id)
}

public 
welcome(id)
{
    new 
name[32]
    
get_user_name(idname31)
    
client_print(idprint_chat"[INFORMATION] You can jump when you have a minigun in this server")
   }
   
   return 
PLUGIN_HANDLED
    

ERRORS:
Code:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/amxmodx/tmp3/phplsRu9R.sma(19) : error 017: undefined symbol "SCW_MINIGUN" /home/groups/amxmodx/tmp3/phplsRu9R.sma(21) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phplsRu9R.sma(22) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phplsRu9R.sma(26) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phplsRu9R.sma(26) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp3/phplsRu9R.sma(26) : error 004: function "client_putinserver" is not implemented
/home/groups/amxmodx/tmp3/phplsRu9R.sma(32) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp3/phplsRu9R.sma(32) : error 017: undefined symbol "welcome" /home/groups/amxmodx/tmp3/phplsRu9R.sma(35) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phplsRu9R.sma(39) : warning 217: loose indentation

5 Errors.


Could not locate output file /home/groups/amxmodx/public_html/websc3/phplsRu9R.amx (compile failed).
FormulaZero is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 03-08-2007 , 20:44   Re: Compile Errors - Code Cleanup
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <svencoop> #define PLUGIN "SvenCoop - Minigun Powers" #define VERSION "1.0" #define AUTHOR "FormulaZero" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("CurWeapon", "weaponminigun", "be") } public weaponminigun(id) {     new clip,ammo     new weapon = get_user_weapon(id,clip,ammo)     if(weapon == 21) {         set_user_maxspeed(id, 300.1)         set_user_gravity(id, 1.5)         client_print(id, print_center, "You can now jump while using the minigun.")     }         return PLUGIN_HANDLED } public client_putinserver(id) {     set_task(3.0, "welcome", id) } public welcome(id) {     new name[32]     get_user_name(id, name, 31)     client_print(id, print_chat, "[INFORMATION] You can jump when you have a minigun in this server")     return PLUGIN_HANDLED     }
"SCW_MINIGUN" is defined in the svencoop module, so obviously the include needs to be there. But i think it's weaponid is 21, so I changed it.
Drak is offline
Send a message via MSN to Drak
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 03-08-2007 , 20:46   Re: Compile Errors - Code Cleanup
Reply With Quote #3

Thanks, I'll compile it and see what happens.
FormulaZero is offline
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 03-08-2007 , 20:47   Re: Compile Errors - Code Cleanup
Reply With Quote #4

ERROR:
/home/groups/amxmodx/tmp3/phpTbcq05.sma(4) : fatal error 100: cannot read from file: "svencoop"
FormulaZero is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 03-08-2007 , 20:52   Re: Compile Errors - Code Cleanup
Reply With Quote #5

Just remove it, i accidentally left it in.
Drak is offline
Send a message via MSN to Drak
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 03-08-2007 , 20:59   Re: Compile Errors - Code Cleanup
Reply With Quote #6

Thanks for your help, I've submitted my plugin.
FormulaZero 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 03:55.


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