super frustrating

Grundy

Ultra Cool Member
Reaction score
35
i'm trying to find the recyler or cssafety and i cannot find the stuff anywhere on these forums. i tried using the search but that only added to the frustration when a search turns up 0 results and i have to wait 30 seconds to try again. then i get like 8 pages of results but its just people saying that they use the recylcer i cannot find the code for it anywhere
 

Romek

Super Moderator
Reaction score
963
The newer one uses CSData AFAIK.

The older one is something along the lines of this. I doubt it's very far off.
JASS:
library CSSafety
    //==========================================================================================
    globals
        private timer array T
        private group array G
        private integer N = 0
        private integer M = 0
    endglobals

    //==========================================================================================
    function NewTimer takes nothing returns timer
        if (N==0) then
            return CreateTimer()
        endif
     set N=N-1
     return T[N]
    endfunction

    //==========================================================================================
    function ReleaseTimer takes timer t returns nothing
        call PauseTimer(t)
        if (N==8191) then
            debug call BJDebugMsg("Warning: Timer stack is full, destroying timer!!")

            //stack is full, the map already has much more troubles than the chance of bug
            call DestroyTimer(t)
        else
            set T[N]=t
            set N=N+1
        endif    
    endfunction
    
    //==========================================================================================
    function NewGroup takes nothing returns group
        if (M==0) then
            return CreateGroup()
        endif
     set M=M-1
     return G[M]
    endfunction

    //==========================================================================================
    function ReleaseGroup takes group g returns nothing
        call GroupClear(g)
        if (M==8191) then
            debug call BJDebugMsg("Warning: Group stack is full, destroying group!!")

            //stack is full, the map already has much more troubles than the chance of bug
            call DestroyGroup(g)
        else
            set G[M]=g
            set M=M+1
        endif    
    endfunction

endlibrary
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top