tstatus undeclared error

Zero Human

New member
Messages
66
Points
0
Location
Germany, Schleswig-Holstein
Emulator
Client Version
2019-06-26bRagexeRE
I'm trying to take over the skill changes from kRO right now.
This was changed to Sonic Blow:
Improves damage formula, the skill will deal more damage against target who has HP lower than 50% by 50%.

How do I declare tstatus-hp now?

I get this error message:

 error: ‘tstatus’ undeclared (first use in this function)
     if (tstatus->hp < tstatus->max_hp >> 1)


In battle.c:

case AS_SONICBLOW:
                    skillratio += 300 + 40 * skill_lv;
#ifdef RENEWAL
                if (tstatus->hp < tstatus->max_hp >> 1)
                    skillratio += skillratio / 2;
#endif
                    break;

 
As i told you at the Discord Channel, you need to declare it first, the compiler is saying there that "tstatus is unknown for him" that's probably because the before declaration of status are out of the scope (because they are inside conditionals)

I didn't tested it but try to declare it like this before your conditional :
 

Code:
struct status_data *tstatus = status->get_status_data(bl);
 
Back
Top