i cannot use structs

dannyboydude

Ultra Cool Member
Reaction score
33
well i was reading a tut about structs

so i copied this but i cannot understand how to use structs , and the structname.create is sopposed to b brown but its jsut white like normal heres a screen shot
Pictures.jpg
JASS:
struct structname
    unit caster
endstruct        
        
function funcname takes nothing returns nothing
    local structname data = structname.create()
    set data.caster = GetTriggerUnit()
endfunction


//===========================================================================
function InitTrig_Struct takes nothing returns nothing
    set gg_trg_Struct = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Struct, function funcname )
endfunction
 

Viikuna

No Marlo no game.
Reaction score
265
I dont see anything wrong here, just keep going. :)
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
Did you add scopes? like

JASS:
scope Spell Name

endscope
 

Gwypaas

hook DoNothing MakeGUIUsersCrash
Reaction score
50
Scopes/Librarys doesn't affect structs until you declare the struct as private or public inside a scope/librart
 

dannyboydude

Ultra Cool Member
Reaction score
33
OMG lol its TH highlight i though i was doing something wrong

My bad people

1 Question

How do i add inttegers to my scope?
Then retrieve that integer when i retrieve the scope ?
 

Gwypaas

hook DoNothing MakeGUIUsersCrash
Reaction score
50
No he attaches the integer to a function name and then he returns the scope name using SCOPE_PRIVATE :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top