Jump to content

Global tables


Recommended Posts

Hello,

I currently understand almost everything of the lua coding structure although there is one thing that keeps annoying me.

Tables,

I'm able to use them when it comes to the script where they are created but from the moment I try to use them globaly it gives errors.

So my question: Is it possible to use tables as a global variable?

Note: I didn't make them local xp

Link to comment

tables work exactly like any other variable. Let's say you have a server side variable serverVar = "niceHair". It can be called from server side scripts of that resource. Same case if you had a server side table serverTable = {}. You can operate with it only server side.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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