Jump to content

Recommended Posts

Posted

lua syntax for using objects such as a zone ,or a SET_GROUP as arguments inside of functions.

 

In c++ you set up pointers in general , so that you don't pass the whole object over.. you could do it that way as well of course , but mostly pointers are the better way to go.

 

So if I want to access global variables (I created for using the moose clasees ) that are zone objects , Group objects , group sets and so on,

what is the best syntax for doing this in lua ?

heh so many computer languages and they all want to do it a different way!!! :megalol:

Posted

oh, well the syntax I experimented with didnt work so I looked through all the lua info I could get and then tried looking for some sample code so I can use that syntax and it will work. the more I looked into functions online last night ,the more I ... ... ...

Posted (edited)

sample code please . I am working away on other little areas in my coding but my function calls with zone objects are failing at the moment. Must be in the syntax somewhere. Just tried putting the object in and it says it's nil . Not initialized I imagine. The global of course IS initialized and used in other parts of the code. including inside the function that I want to put it in as a argument.

 

 

OK : Syntax that was missing is as follows: Place functions at bottom of code that initializes it . That way objects get recognized. Makes sense of course . I finally got a piece of code ,an event handler, which showed this clearly. Oh Well , so many computer languages to program in, just like human languages I guess. Next week I will forget this whole thing...

Edited by Lineaxe
more typing corrections
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...