Raised This Month: $ Target: $400
 0% 

Problems with my battlesuit plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 01-02-2010 , 18:19   Problems with my battlesuit plugin
Reply With Quote #1

I have no clue what went wrong in the compile and i dont know how to fix the errors. Please help!

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

register_plugin(Battlesuit,r4nDoMz,1.0);

new 
health get_user_health()
new 
armor get_user_armor()
//new maxspeed = get_user_maxspeed()

public plugin_init()

public 
client_putinserver()
{
    if( 
is_user_alive() ){
        
//set_user_gravity (id, 0.625)
        
cs_set_user_armor(idarmor 50)
        
cs_set_user_health(idhealth*1.5)
        
//cs_set_user_maxspeed(id, maxspeed + 100)
    
}

Errors:

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


PHP Code:
//// battlesuit.sma
// C:\Documents and Settings\*****\Desktop\compiler\battlesuit.sma(6) : error 021
symbol already defined"register_plugin"
// C:\Documents and Settings\*****\Desktop\compiler\battlesuit.sma(14) : error 02
9invalid expressionassumed zero
// C:\Documents and Settings\*****\Desktop\compiler\battlesuit.sma(22) : warning
203symbol is never used"client_putinserver"
//
// 2 Errors.
// Could not locate output file C:\Documents and Settings\*****\Desktop\compiler\
compiled\battlesuit.amx (compile failed).
//
// Compilation Time: 0.23 sec
// ----------------------------------------

Press enter to exit ... 
Also, how would i make it so only users with their steamid in a .txt file can get the bonus?
__________________
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

Last edited by r4ndomz; 01-02-2010 at 18:24.
r4ndomz is offline
Send a message via Skype™ to r4ndomz
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 01-02-2010 , 18:30   Re: Problems with my battlesuit plugin
Reply With Quote #2

What a shitty code, learn to code...

Some basics
- register_plugin has to be in public plugin_init
- clean up your code, it's messy
- the AUTHOR, NAME and VERSION of your register_plugin must be between 2 " ("1.0")
- 'new health, armor & maxspeed' must be in public client_putinserver
- there is no such thing as cs_set_user_health & cs_set_user_maxspeed
- why are you using 'id' if it's not defined?
- 'armor +50' and all that shit, isn't possible... How do you think?

Fix those things first & then ask for help
__________________

Last edited by crazyeffect; 01-02-2010 at 18:37.
crazyeffect is offline
Send a message via MSN to crazyeffect
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 01-02-2010 , 19:47   Re: Problems with my battlesuit plugin
Reply With Quote #3

Jesus, i think that was a bad reply, not because it wasnt right but because you were acting like im a pro scripter and im just one week into trying to learn this stuff, and i think im doing good.

Thx anyway it worked and i ended up taking everything out accept for gravity.

http://www.amxmodx.org/funcwiki.php?go=inc&id=7. There is actually those functions, you got it backwards. There is also both get user and set user armor in here http://www.amxmodx.org/funcwiki.php?go=inc&id=11

Still, How do i make it so only people with their steamid's in a txt file get the gravity etc?
__________________
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

Last edited by r4ndomz; 01-02-2010 at 20:12.
r4ndomz is offline
Send a message via Skype™ to r4ndomz
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 04:09.


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