jackall
You can change this now in User CP.
- Reaction score
- 37
Since this is the first struct I've ever made, I've had a few problems with it but one keeps reappearing...
Can someone explain to me why the compiler screams at me when I try to save a map that has that struct?
Meaning: how can I use the "GetHP" method inside the "RestoreHP" one?
It may seem so very simple to you but I'm still at the beginning of learning vJASS so I'm
JASS:
struct Paladin
unit Hero
integer Type = 039;Hpal039;
method GetHP takes nothing returns real
return GetUnitState(.Hero,UNIT_STATE_LIFE)
endmethod
method GetMP takes nothing returns real
return GetUnitState(.Hero,UNIT_STATE_MANA)
endmethod
method RestoreHP takes real howMuch returns nothing
call SetUnitState(.Hero,UNIT_STATE_LIFE,.GetHP+howMuch)
endmethod
method RestoreMP takes real howMuch returns nothing
call SetUnitState(.Hero,UNIT_STATE_MANA,.GetMP+howMuch)
endmethod
endstruct
Can someone explain to me why the compiler screams at me when I try to save a map that has that struct?
Meaning: how can I use the "GetHP" method inside the "RestoreHP" one?
It may seem so very simple to you but I'm still at the beginning of learning vJASS so I'm