Guest User

Macros in KeeperRL

a guest
Aug 28th, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1.  
  2. #Define a macro anywhere in your file
  3. Def MyMacro1(Argument1, Argument2)
  4. # everything before "End" is the body of the macro
  5.  
  6. DoSomething 0123, Argument1, blabla Argument2
  7. DoSomething2 Argument2
  8.  
  9. End # don't forget this!!
  10.  
  11. # use your macro wherever you want, it will paste the arguments into the macro body, and paste the macro body at the place of the usage
  12.  
  13. "MY_DEFINITION" MyMacro1("zombies", "swords")
  14.  
  15.  
  16. # the result will be:
  17.  
  18. "MY_DEFINITION"
  19. DoSomething 0123, "zombies", blabla "swords"
  20. DoSomething2 "swords"
  21.  
Advertisement
Add Comment
Please, Sign In to add comment