Undeclared method, sad?

the Immortal

I know, I know...
Reaction score
51
Any specific reason behind this
JASS:
library sadlib
    struct sadstruct
        integer int
        
        static constant method sadf takes nothing returns integer
            return 15
        endmethod
        
        static method create takes nothing returns thistype
            local thistype t = thistype.allocate()
            set t.int = sadf()
            return t
        endmethod
    endstruct
endlibrary
Not working? Throws an 'undeclared function sadf' error.

I could essentially change the sadf constant method into a normal constant function for exactly the same result, but hey, I prefer it a method, keeps things more organized (that's the point of structs / classes, rite?). Removing the constantness (kinky word) from it doesn't change anything as well. Any ideas?
Bug report? Some limited functionality? Error in my coding? =D

ps. yeh, it's 2:30 AM, I'm prone to stupid mistakes and no, I cba making a wc3c account exactly now in order to ask it in the specific thread there. Maybe tomorrow if it still bothers me
 

the Immortal

I know, I know...
Reaction score
51
omfg, sad

I knew it was something really sad!

ps. delete wouldn't be sad. Stoned being is sad.
 
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