uninitialized local variable

dreinor

New member
Messages
54
Points
0
Github
dreinor
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?
default_biggrin.png
thanks..
 
Last edited by a moderator:
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?
default_biggrin.png
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.

 
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.

 
Back
Top