[ Suggestion ] - Make the connections like roblox style and add findFirstChild - Printable Version +- 2DWorlds Forums (http://2dworlds.buildism.net/forum) +-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4) +--- Forum: 2DWorlds Discussion (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=10) +--- Thread: [ Suggestion ] - Make the connections like roblox style and add findFirstChild (/showthread.php?tid=1081) |
[ Suggestion ] - Make the connections like roblox style and add findFirstChild - ptown2 - 10-16-2010 since this script Code: while true do requires findFirstChild, it is needed in the LUA Database and can you make the connections similar in ROBLOX, so it can be more easier? RE: [ Suggestion ] - Make the connections like roblox style and add findFirstChild - Jacob__mybb_import1 - 10-16-2010 The latest update has a getChild() that works like findFirstChild() in Roblox. And the connections will have to stay this way for now. Roblox uses one Lua environment with multiple threads; the Lua library I used doesn't support threads so each script has a separate Lua environment. If a member function was used to connect events, then the game wouldn't know what Lua environment to run the event script on, if that makes any sense. RE: [ Suggestion ] - Make the connections like roblox style and add findFirstChild - ptown2 - 10-16-2010 well that fixes everything about the connectors, but what bugs me most is this: [2010-10-16 17:34:14] Tried to call nil when you do a if not statement example: Code: sa.Source = "link(script.Parent.Collided, function(touch) if touch.Name ~= "Ground" and touch.Score ~= nil then script.Parent:remove(); end end)" RE: [ Suggestion ] - Make the connections like roblox style and add findFirstChild - Jacob__mybb_import1 - 10-16-2010 Is Score a value object? If it is you have to get the Value property (touch.Score.Value). Not statements shouldn't cause errors. RE: [ Suggestion ] - Make the connections like roblox style and add findFirstChild - ptown2 - 10-17-2010 even with the score out, it still says the same error RE: [ Suggestion ] - Make the connections like roblox style and add findFirstChild - Jacob__mybb_import1 - 10-17-2010 I finally realized what the problem is, you have to escape quotes in strings with backslashes, otherwise it gets confused. Code: sa.Source = "link(script.Parent.Collided, function(touch) if touch.Name ~= \"Ground\" and touch.Score ~= nil then script.Parent:remove(); end end) RE: [ Suggestion ] - Make the connections like roblox style and add findFirstChild - zeyan12 - 12-30-2010 [spam removed] |