Quote:
Originally Posted by Phil25
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.
|
Code:
void GetClassMaxHealth(int client)
{
TFClassType class = TF2_GetPlayerClass(client);
int Health;
switch(class)
{
case TFClass_Scout: Health = 125;
case TFClass_Soldier: Health = 200;
case TFClass_Pyro: Health = 175;
case TFClass_DemoMan: Health = 175;
case TFClass_Heavy: Health = 300;
case TFClass_Engineer: Health = 125;
case TFClass_Medic: Health = 150;
case TFClass_Sniper: Health = 125;
case TFClass_Spy: Health = 125;
}
return Health;
}
This is just added into the new syntax (1.7), so don't try to use anything from the old syntax.
__________________