This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[QUESTION] Is there a "unless" command?
Started by Matrixmage, 09 August 2012 - 03:20 AMPosted 09 August 2012 - 05:20 AM
Title says it all, wondering if there is some kind of condition so something only happens if something else is or isn't true
Posted 09 August 2012 - 05:51 AM
For some reason this is taking a long time to process through my head, let me read this a few times..
Posted 09 August 2012 - 05:52 AM
if (ConditionGoesHere) then
–blah
else
–different blah
end
or there's
if not (ConditionGoesHere) then
–blah
else
–other blah
end
Turns out I could help you out with something after all. That's a weight off my shoulders lol
–blah
else
–different blah
end
or there's
if not (ConditionGoesHere) then
–blah
else
–other blah
end
Turns out I could help you out with something after all. That's a weight off my shoulders lol
Posted 09 August 2012 - 06:37 AM
You mean like "Do this, unless this?"
How about
If (UnlessCondition) then
–Unless Code
else
–What should happen normally
end
How about
If (UnlessCondition) then
–Unless Code
else
–What should happen normally
end
Posted 09 August 2012 - 03:15 PM
An example of what you are trying to do unless this is true would help a bit. You are breaking my brain.
Posted 09 August 2012 - 05:56 PM
I think I was a bit of an idiot: elseif anyone? ;)/>/>
Posted 09 August 2012 - 05:57 PM
if (ConditionGoesHere) then
–blah
else
–different blah
end
or there's
if not (ConditionGoesHere) then
–blah
else
–other blah
end
Turns out I could help you out with something after all. That's a weight off my shoulders lol
I love this community ;)/>/>
Posted 10 August 2012 - 01:12 AM
if (ConditionGoesHere) then
–blah
else
–different blah
end
or there's
if not (ConditionGoesHere) then
–blah
else
–other blah
end
Turns out I could help you out with something after all. That's a weight off my shoulders lol
I love this community ;)/>/>
That comment made the dark cloud of all the arguing-over-tekkit nastiness go away :(/>/>
And yeah, I get annoyed when I try to help someone then get upstaged by the higher ups D:
(then again, they are probably annoyed with my 20 posts a day average lol)
I misinterpreted what you wanted though. If you had said 'multiple conditions' I would have been all 'boing, answer', but oh well : )