How can I use multiple files?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
How can I use multiple files?
So I have a main.lua with nothing in it, and a player.lua which is just a rectangle with user input. And none of the tutorials I've seen so far have helped. How can I call player.lua into the main.lua?
Re: How can I use multiple files?
You require it.
This will just include that file, you can also do
Here is the tutorial chapter about this
http://sheepolution.com/learn/book/9
Code: Select all
require 'player'
Code: Select all
Player = require 'player'
http://sheepolution.com/learn/book/9
Who is online
Users browsing this forum: Ahrefs [Bot] and 53 guests