| |
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
| |
|
|
| 17 Jun 2012 12:34 PM |
If you do mean what does ~= mean then it means not.
-orangegreenblue, the Lua Noob |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 17 Jun 2012 12:36 PM |
| No, `not` means not. `~=` means not equal to. |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2012 01:23 PM |
| "not" can only be used for a boolean, and ~= can be used for multiple types, and like NXTBoy said... "~=" means not equal to. |
|
|
| Report Abuse |
|
|
| |
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 17 Jun 2012 02:00 PM |
@thecaptain97: Incorrect:
theproblem = "something"
if theproblem ~= true then print "Ok so far..." end if theproblem == false then print "But this never prints" end |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 17 Jun 2012 02:03 PM |
@scripterjq: > "not" can only be used for a boolean'
Also false. I can write the following, and use `not` on a non-object:
if not workspace:FindFirstChild("XYZ") then ... end
In most cases, `not x` is equivalent to `x == false or x == nil`. Only when metatables are involved does that cease to be true. |
|
|
| Report Abuse |
|
|