Just need a little help getting this right before I start programming it.
Is this right? Am I allowed to do something like this with structs, every if they are local.
JASS:
struct Staffdata //declaring the struct
integer task
integer Guestnumber
boolean Guestlefted
endstruct
function blah takes nothing returns nothing
//this function assigns the struct Index to the unit
local Staffdata Hi = Staffdata.create()
local integer i = integer(Hi)
call SetUnitUserData(u,i)
endfunction
function blah2 takes nothing returns nothing
//this function calls the created struct.
local Staffdata Hi = Something?(GetUnitUserData(u)) //what do I do here?
//Do some wicked stuff
call Hi.destroy()
endfunction
Is this right? Am I allowed to do something like this with structs, every if they are local.