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
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!
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 = “ Al