O
Reaction score
93

Profile posts Latest activity Postings About

  • Waits should be banned. Forever. But, if you want to transfer data with timers, use Key Timers 2.

    JASS:
    //Untested:
     library loltimers initializer onInit requires KT
        globals
        endglobals
        struct Data
            integer key
            private static method create takes nothing returns thistype 
                local thistype this=thistype.create()
                return this
        endstruct
        private function callback takes nothing returns boolean
            local Data data=KT_GetData()
            call BJDebugMsg(I2S(data.key))
            // Shows you 0 <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile    :)" data-shortname=":)" />
            return true
        endfunction
        private function onInit takes nothing returns nothing
            local Data data=Data.create()
            set data.key=0
            call KT_StoreData(3.00,data,function callback)
        endfunction
     endlibrary
    Yeah, be careful though, if you're using waits, I think it can bug, not sure. You can also use [LJASS]GetHandleId(GetExpritingTimer())[/LJASS] or something similar to that to achieve MUI struct storage.
  • Loading…
  • Loading…
  • Loading…
Top