|
| 09 Jan 2015 03:23 AM |
| next step conquer the world |
|
|
| Report Abuse |
|
|
Nindoz
|
  |
| Joined: 15 Mar 2012 |
| Total Posts: 21968 |
|
| |
|
Voxio
|
  |
| Joined: 05 Nov 2006 |
| Total Posts: 865 |
|
|
| 09 Jan 2015 03:24 AM |
| how? please tell me, I'm interested. |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jan 2015 03:26 AM |
@vox
use 'and' and 'or'
using if statements it'd be
local wat = 0.69
if wat > 0.5 then print ('wat > 0.5') else print ('wat < 0.5') end
but without it, itd be
local wat = 0.69
print (wat > 0.5 and 'wat > 0.5' or wat < 0.5 and 'wat < 0.5')
|
|
|
| Report Abuse |
|
|
Voxio
|
  |
| Joined: 05 Nov 2006 |
| Total Posts: 865 |
|
|
| 09 Jan 2015 03:26 AM |
that's too confusing, wat?
if statements ftw |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2015 03:29 AM |
local wat = 0.69
print (wat > 0.5 and 'wat > 0.5' or wat < 0.5 and 'wat < 0.5')
wat > 0.5 and 'wat > 0.5' means
first it checks if wat > 0.5, if it does, then the 'and' can continue on
once it continues on, it prints 'wat > 0.5' but if wat doesnt > 0.5, it wont continue to the next 'and'
and whenever u do an if statement, if the if is false, it checks for an 'or'
so if wat doesnt > 0.5, it will go to the 'or' and check for whatever is after the or |
|
|
| Report Abuse |
|
|