Compile errors
I wrote this plugin just now as my first ever to see if I could do it, but I got compiling errors but don't know how to read them/learn from them.
Does anyone know why this happened? Code:
#include <amxmodx> |
Re: Compile errors
try this...
PHP Code:
PHP Code:
|
Re: Compile errors
Code:
/home/groups/amxmodx/tmp3/phpLibAIS.sma(15) : warning 217: loose indentationAlso what else can be done to fix this ? |
Re: Compile errors
Basically you had to include cstrike because you are using functions from that module ex: cs_get_user_money(id). you have to include fun because you are using a function from that module ex: set_user_gravity(id,grav).
You had money = get_user_money(id) in the plugin_init() function but that function is called when the plugin starts and doesnt pass player id's. Then since u register a cvar as a float u must get it as a float and save it to a variable that is a float.... new Float:grav = get_pcvar_float(gravity). I hope I explained that so u can understand what i mean... |
Re: Compile errors
Whats Float mean though?
And could you better explain the HUD you added please? And also the plugin gets a file open error, what is the problem ? |
Re: Compile errors
Show the error your server is getting please.
A float is a number with a decimal bascially like 20.0 or 20.983 Sorry i forgot about the HUD. Here is a link that will explain the use of CreateHudSyncObj and ShowSyncHudMsg better then i can http://www.amxmodx.org/funcwiki.php?...cObj&go=search. Then you must set_hudmessage() which is a function used to format your hud message http://www.amxmodx.org/funcwiki.php?...sage&go=search. AMXX studio has a hudmessage generator that will automatically set the numbers. Then finally show the HUD message by using ShowSyncHudMsg http://www.amxmodx.org/funcwiki.php?...dMsg&go=search. Hope this helps. |
Re: Compile errors
There isnt really an error, the only thing the console says it "Plugin file open error."
But when compiling I get these errors with this code: PHP Code:
PHP Code:
Also I found that if you space these out like this, i get a whole nother list of compiling errors, do they have to be all together? Code:
#include <amxmodx> |
Re: Compile errors
No they dont have to be together. Also the placement of money = cs_get_user_money(id) is in the wrong place.
PHP Code:
|
Re: Compile errors
How do I know when/where do make it a "float"
And why does money have to be in "Testing"? I put it in plugin.init because I was telling it what "money means" since its a nick for cs_get_user_money(id) PHP Code:
|
Re: Compile errors
EDIT: Faaaaaar too late
|
| All times are GMT -4. The time now is 05:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.