Jump to content
  • 0
dreinor

uninitialized local variable

Question

hi.. can someone help me, how do i fix this error after compiling? it says:
warning C4700: uninitialized local variable 'tstatus' used
 

struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv) {
struct skill_condition req;
struct status_data *st;
struct status_data *tstatus;
struct status_change *sc;
int i,hp_rate,sp_rate, sp_skill_rate_bonus = 100;
uint16 idx;

i tried to add the red colored code in the block, how can i fix the error? anyone willing to help?:D thanks..
Edited by dreinor

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

hi.. can someone help me, how do i fix this error after compiling? it says:

warning C4700: uninitialized local variable 'tstatus' used

 

struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv) {

struct skill_condition req;

struct status_data *st;

struct status_data *tstatus;

struct status_change *sc;

int i,hp_rate,sp_rate, sp_skill_rate_bonus = 100;

uint16 idx;

i tried to add the red colored code in the block, how can i fix the error? anyone willing to help?:D thanks..

That function does not have any Id of target, so you cannot get target status.

Possible way is to edit the part from which this function is called or edit the function to accept extra parameter which receieves target bl.

Share this post


Link to post
Share on other sites
  • 0

Maybe I misinterpreted, I guess gemstone requirement is checked before target selection, so you have to give gemstone back after skill is used, that's the way I can think of.

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...

×
×
  • Create New...

Important Information

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