Keyword

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
So, as I'm continuing to practice NewGen I had another problem.

JASS:
scope test
    keyword h
    
    function t takes nothing returns nothing
        call h("Works!")
    endfunction
    
    function h takes string s returns nothing
        call BJDebugMsg(s)
    endfunction
endscope


When I save the map I get an error that it's title is "!", the description is "67", and the options are (buttons' names) "abort", "ignore", and "retry". Doesn't matter what button I press I get syntax errors. Odd? I think so too. Even odder, when I change it to that:

JASS:
scope test
    private keyword h
    
    function t takes nothing returns nothing
        call h("Works!")
    endfunction
    
    private function h takes string s returns nothing
        call BJDebugMsg(s)
    endfunction
endscope


I don't get the error, but still syntax errors.

JASS:
scope test
    public keyword h
    
    function t takes nothing returns nothing
        call h("Works!")
    endfunction
    
    public function h takes string s returns nothing
        call BJDebugMsg(s)
    endfunction
endscope


Same thing.
 

0zaru

Learning vJASS ;)
Reaction score
60
i really don't know that there is a type called keyword :p Maybe you are using an struct ? Can you tell me what is a keyword please ? :eek:
 
Reaction score
456
JASS:
scope test
    private keyword h
    
    private function t takes nothing returns nothing
        call h.evaluate("Works!")
    endfunction
    
    private function h takes string s returns nothing
        call BJDebugMsg(s)
    endfunction
endscope


Try that one. For me it doesn't give errors, but haven't tried ingame.
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Thanks Überplayer, I guess all I need to do now is to figure out how evaluate works. By the way, why does it give me error 67 when I remove the private before the keyword?
 
Reaction score
456
Jass Helper Manual doesn't tell the reason, but you can make only keywords that has private or public in front of them, or else it gives some errors.
 
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