Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Shiira_

Could someone who understands LUA help me understand how to use this code?

Question

I found this github project through the OpenComputers forums that converts and displays custom images in Minecraft. I've got the converter working, but the LUA code returns an error when I execute it on my OpenOS computer.

Vj9T.png.dd1bb010f739f1f74cd39595a5f5c864.png

In accordance with the github readme I set CPU architecture to LUA 5.3. I used 'wget' to download ctif-oc.lua directly from the github page. In the original forum thread someone mentioned that the location of the image needed to be inserted in the args table as a string in the code. On line 1 I see "local args = {...}" which I assume is the location they are talking about. The problem is I don't know what it means to insert the location of my image as a string. Is this all I need to do to get this program to function? If so could someone provide an example of what that section of the code looks like after you have done it?

I tried copying my image into bin and inserting the name of the image ('miku.ctif' in this case), but it returned an 'attempt to index a nil value' error. I also tried inserting '/bin/miku.ctif' which returned an 'unexpected symbol' error for '/'. Clearly I need to do something more than just insert the path to the file, I just don't know what that is.

github page: https://github.com/ChenThread/ctif

original forum post:

 

Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.