Jump to content
  • 0
Sign in to follow this  
Zero Human

tstatus undeclared error

Question

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:

Quote

 

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

 

 

In battle.c:

Quote

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

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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 :
 

struct status_data *tstatus = status->get_status_data(bl);


 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.