a looting mod & several questions

Freeform discussion about anything related to modding Transcendence.
User avatar
Patupi
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Fri Apr 06, 2012 9:24 pm

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 .
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.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

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.
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...
Get your own Galactic Omni Device
Get it now. It's free!!
Image
User avatar
Patupi
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Fri Apr 06, 2012 9:24 pm

OK, I understand (did say something rather stupid here, edited it out. *sigh* Too late in the day and didn't read well enough at first pass)

Thanks
Post Reply