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

Line 74 then expected....

Started by qmarchi, 03 September 2012 - 03:56 AM
qmarchi #1
Posted 03 September 2012 - 05:56 AM
OK so I'm writing an new OS and I'm ready to publish it after I get this bug removed…

So CC for some reason expects 74 to have a then statement…
the issue is that i have it there and it still needs it to be there…

Line 74:

if ossel = "lock" then

Here's the reference to ossel

ossel:

write("Select Mode: client or lock :")
ossel = read()

for those wishing to see the entire code
http://pastebin.com/qJpydFC8
Note: I edited the paste for credit reasons. Line 74 is now line 75. And no it still doesent work…
Grim Reaper #2
Posted 03 September 2012 - 06:19 AM
On line 75:

if osse1 = "lock" then
You use the initialization operator: '=', instead of the comparison operator for equal: '=='.

Basically, your code reads like this:
Set the variable osse1 to the string "lock" then if that value… Wait?… There's no value returned from that operation! What do?! (explosions.)

Instead you want this:

if osse1 == "lock" then
The above code reads like this:
If the variable osse1 holds the value of the string "lock" then do whatever is after here until the you find the end keyword.

Hope I helped! :D/>/>
qmarchi #3
Posted 03 September 2012 - 08:40 PM
Me == "Missed it"

thanks!