[TF2] return function; (new syntax)
Hi there, so i was converting (red2robot) to the new syntax and i decided to add #pragma newdecl required; in
problem is, i always keep getting warnings on stuff like "return X;", and i have no idea why, i just added return; on createparticle but for getclassmaxhealth? i just made it return; without anything after it and now it tells me that X (which is health) as symbol that is never used, i might not know more about the new syntax, tho that's what's bugging me, any help can be appreciated as long it's correct. |
Re: [TF2] return function; (new syntax)
We're going to need to see some code to tell you what's wrong with it.
|
Re: [TF2] return function; (new syntax)
I'm not certain but I think not putting a type before the function will make it an int type. If you don't need to return anything, set it as void. But like ddhoward said, you should post your code.
|
Re: [TF2] return function; (new syntax)
Quote:
Code:
void GetClassMaxHealth(int client) |
Re: [TF2] return function; (new syntax)
For this to work you should change "void" to "int". But what you're trying to achieve could be done with reading the max health netprop of the player entity. I advise you to do that as max health could change depending on the loadout.
|
Re: [TF2] return function; (new syntax)
Quote:
|
Re: [TF2] return function; (new syntax)
Quote:
well thanks anyway, that actually helped! :up: |
Re: [TF2] return function; (new syntax)
Just a follow up on what I've said before:
PHP Code:
|
Re: [TF2] return function; (new syntax)
Quote:
PHP Code:
|
Re: [TF2] return function; (new syntax)
Quote:
Edit: i just realized that resets the health to the actual health the player had (damnit) |
All times are GMT -4. The time now is 05:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.