Ahh, I wondered why so many mods had needlessly used block Nil... Well, I THOUGHT needlessly. I'm still not up to snuff with this code. Nothing like GML. Might take me a while to get used to the ins and outs of this.Schnobs wrote:In other words, if you want to run more than one function, you need to wrap a (block [...]) around them. Merely adding more brackets won't do. I think it was Azziweaver who pointed that out to me on IRC .
a looting mod & several questions
- alterecco
- Fleet Officer
- Posts: 1658
- Joined: Wed Jan 14, 2009 3:08 am
- Location: Previously enslaved by the Iocrym
The block is used to declare scoped variables. That is, variables local to the code inside the block. If you don't have any variables to declare, you can use an empty set of parentheses or just nil (since an empty list evaluates to nil). I hope that helps to clarify a bit...Patupi wrote:Ahh, I wondered why so many mods had needlessly used block Nil... Well, I THOUGHT needlessly. I'm still not up to snuff with this code. Nothing like GML. Might take me a while to get used to the ins and outs of this.