- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Hakz_Studios
-
Content Count
4 -
Joined
-
Last visited
Posts posted by Hakz_Studios
-
-
I have a question why type 3 ends? I am thinking one ends the loop,another ends the main function and the last ends the program. Am I right? And it gave me this error:/lib /process.lua:52: /home/autorun.lua:18: syntax error near ‘username’:
stack traceback:
|C|: in function ‘assert’
/lib/process.lua:52: in function </lib/process.lua:35>
(...tail calls...)
[C]: in function ‘xpcall’
machine:791: in function ‘xpcall’
/lib/process.lua:63: in function </lib/process.lua:59>
Help!
-
Yes I am trying to restart the function thanks for the compliment and help this will really help me!
-
I need help with my autorun.lua program It won’t take my If-then statements what am I doing wrong?
(I am using Computronics)
Here is the program
— local require commands start
local component= require (“component”)
local sides = require(“sides”)
local rs = component.redstone
local event = require(“event”)
local os = require(“os”)
— local require commands end
— Main function start
local function main()
local username.message = event.pull(“chat_message”)
—problematic loop start
if (username = “Hakz_Studios” and message = “ Alice Refuel”) then
component.speech_box.say(“Refueling”)
component.chat_box.say(“Refueling”)
repeat
local username,message = event.pull(“chat_message”)
rs.setoutput(sides.bottom)
untill username= “Hakz_Studios” and message = “Stop Refueling”
— restarting function
function main()
elseif username = “Hakz_Studios” and message = “Stop Refuel Systems”
os.execute(“Shutdown”)
else function main()
—problematic loop end
end
— main function end
Sorry If I had many mistakes I just started Coding Today and Thanks in advance
Microcontroller help
in Programming
Posted
My microcontroller keeps giving me the error bad argument #1 (string expected got nil) What did I do wrong? Everything seems ok https://pastebin.com/x29Bgig