MunimR
(MunimR)
November 12, 2013, 1:46am
1
print(((“should not print” or false) and true) or false)
This prints “should not print”, but it should print true
It seems like I am not the first person to figure this out (Anamius told me it was a bug known for a while)
roblox staff fix it now
just do it
1 Like
GollyGreg
(GollyGreg)
November 12, 2013, 2:23am
2
Let’s break this down.
print(((“should not print” or false ) and true ) or false )
“should not print” or false –this is to be true since “should not print” is initialized and not null
so now we have this
print(((true ) and true ) or false )
which is the same as
print((true and true ) or false )
Since (true and true ) returns true, we can ignore false and print the initial message
Edit: nevermind I thought you were saying it shouldnt be true and im dumb
MunimR
(MunimR)
November 12, 2013, 2:28am
3
[quote]
Edit: nevermind I thought you were saying it shouldnt be true and im dumb [/quote]
claps for gollygreg
zeuxcg
(zeuxcg)
November 12, 2013, 2:45am
4
Whimzee
(Whimzee)
November 12, 2013, 6:42am
5
[quote] That’s a Lua bug:
http://www.lua.org/bugs.html#5.1.4-3
http://www.lua.org/bugs.html#5.1.4-9
Looks like upgrading to 5.1.5 may fix it. [/quote]
Well only you guys can do that. I’ve heard that can add quite a few bugs to the game, why?
Forummer
(Forummer)
December 14, 2021, 6:31am
6
print((("should not print" or false) and true) or false)
A long awaited update, but this was fixed quite some time back.
2 Likes