Board Thread:Support Requests - Getting Technical/@comment-23880286-20150719180003/@comment-23880286-20150719194941

Dessamator wrote: Vogel100 wrote: Oh, okay. Normal variables are global by default and you always have to add the local keyword, so I thought it would be the same for functions. In other modules using "local function" did work though. I wonder why it didn't give an error there. It should work, if you don't include the p table, for example:

Then I was doing it right. :o That was what I included the old version for. Look here. I didn't include the p table. This was what I was trying to do at first, but it gave an error. The error message was that I was trying to access a global variable that didn't exist or something similar. So how do I make local functions without including p that don't give weird script errors?

By the way, I've made this module before, which also uses local functions, but that one doesn't give an error. What's the difference between the two modules?