makromoo 0 Posted August 16, 2014 Share Posted August 16, 2014 Hello! I'm trying to create an API and use it. My API File (button): function print() print("Hello from button!") end My File using the API (use): button = require("button") button.print() Yes the button is button.lua Error is: Attempt to index global 'button' a boolean value (a boolean value) Thanks for your time! Quote Link to post Share on other sites
0 Solution Wobbo 8 Posted August 16, 2014 Solution Share Posted August 16, 2014 I would suggest you read a tutorial, like [shameless plug]mine[/shameless plug]. That should teach you everything you need to know about loading and writing libraries. Quote Link to post Share on other sites
0 makromoo 0 Posted August 16, 2014 Author Share Posted August 16, 2014 Shame on me Trusting google would know an API could also mean library Thanks ! Quote Link to post Share on other sites
Hello!
I'm trying to create an API and use it.
My API File (button):
function print()
print("Hello from button!")
end
My File using the API (use):
button = require("button")
button.print()
Yes the button is button.lua
Error is: Attempt to index global 'button' a boolean value (a boolean value)
Thanks for your time!
Link to post
Share on other sites