|
For most 'If' Statements I use .. for Example..
if mouse.target.Example ~= nil then
This makes it check if Example is there, if its not it gives me a error in output that says that example isn't there and the script brakes. This gets very annoying.
I don't like having to bi-pass your faulty database so I would like for you guys to fix this. Thanks ~ codysuber12 |
|
MooseboyJoin Date: 2008-07-15 Post Count: 448 |
ROBLOX can't change Lua.
~|~|~Mooseboy~|~|~
--King of All Moose |
|
|
Yea they can. They have their own version of Lua.. Roblox Lua.. They can edit how the script treats things. :P |
|
MooseboyJoin Date: 2008-07-15 Post Count: 448 |
Did you remember your else statement?
~|~|~Mooseboy~|~|~
--King of All Moose |
|
|
Of course, but every if doesnt need an else, and even with an else it still shows as an error. |
|
|
Good thing I only do basic scripts. :P |
|
|
"ROBLOX can't change Lua."
They can't change Lua, but they can change RBX.Lua. >.> |
|
|
VorliasJoin Date: 2009-08-27 Post Count: 14478 |
this is how you do it.
if mouse.Target:findFirstChild("example") ~= nil then |
|
VorliasJoin Date: 2009-08-27 Post Count: 14478 |
Now before suggesting something like this, ask a scripter for backup information.
You are welcome. |
|
SwiftWolfJoin Date: 2008-08-04 Post Count: 1140 |
if mouse.target:findFirstChild("Example") ~= nil then -- Just maybe...
I've had some trouble with "if" and "nil." |
|
VorliasJoin Date: 2009-08-27 Post Count: 14478 |
@switf: Target must be capitalized I'm sure... Lua is a very case sensitive language. |
|
|
nil sucks. I mean it's a completely different void if it's 'Nil' rather than 'nil'. |
|
|
@ ninja Scripter for backup information?? I am a scripter.. I know exactly what im talking about and how to use Ro-Lua. Don't post on something you dont know about. |
|