This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
AbCraftNet's profile picture

= Expected but no misspellings?

Started by AbCraftNet, 11 September 2014 - 11:32 PM
AbCraftNet #1
Posted 12 September 2014 - 01:32 AM
I was quickly writing a program and decided to test it out while I was developing it. The code is not finished but ComputerCraft gave me an error that "= was expected" at line 12, which did not make sense for me.

Code:
Spoiler–[[
bTrap is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit creativecommons.org/licenses/by-sa/4.0/.
]]
–Variables (You may change if needed.)
Enabled = true
ShowLoadDebug = true
LockOnDetection = true
OnlineMode = true
–End of Variables
fuction FirstLoad()
if ShowLoadDebug == true then
print("[bTrap] bTrap is now loading.")
print("[bTrap] -Variable Settings-")
print("[bTrap] Enabled = true")
print("[bTrap] ShowLoadDebug = true")
print("[bTrap] LockOnDetection = true")
print("[bTrap] OnlineMode = true")
print("[bTrap] -End of Variable Settings-")
print("[bTrap] bTrap is loading for the first time. Now verifying bTrap documents.")
elseif ShowLoadDebug == false then

else
print("[bTrap] An error has occured with bTrap!")
print("[bTrap] Error: Invalid variable state: ShowLoadDebug")
if LockOnDetection == true then
print("[bTrap] LockOnDetection is enabled. The system will halt.")
os.shutdown()
elseif LockOnDetection == false then
print("[bTrap] bTrap is now disabled!")
else
print("[bTrap] An error has occured with bTrap!")
print("[bTrap] Error: Invalid variable state: LockOnDetection.")
print("[bTrap] A severe error has occured. The system will halt.")
os.shutdown()
end
end
end
Lyqyd #2
Posted 12 September 2014 - 01:38 AM
You've misspelled "function".
AbCraftNet #3
Posted 12 September 2014 - 11:22 PM
Oops. But thanks. I did not know that.