As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 14 Feb 2013 06:47 AM |
Output:
13:05:56 - Players.Player1.PlayerGui.GameGui.IngameScript:96: Players.Player1.PlayerGui.GameGui.IngameScript:1: attempt to index local 'instance' (a nil value) 13:05:56 - Script "Players.Player1.PlayerGui.GameGui.IngameScript", Line 96 - global beginGame 13:05:56 - Script "Players.Player1.PlayerGui.GameGui.IngameScript", Line 108 13:05:56 - stack end
Script bits (Only the ones the output is talking about, lines are marked "n ¨¨¨", where n is the line number):
1 ¨¨¨function waitForChild(instance, name) if instance:FindFirstChild(name) then return instance:FindFirstChild(name) end 2 ¨¨¨repeat wait() until instance:FindFirstChild(name) end function waitForProperty(instance, name) if instance[name] then return instance[name] end 3 ¨¨¨repeat wait() until instance[name] end
96 ¨¨¨coroutine.wrap(function() while true do if not dynamicMap then break end updateMap() wait(0.0875) end end)()
108 ¨¨¨data.IsPlaying.Changed:connect(function() if not deb then beginGame(data.IsPlaying.Value, true) end end) for _,c in pairs(workspace:GetChildren()) do
So: Do you see anywhere in line 96 or 108, where "waitForChild()" is used? I don't... I don't see a single connection between the code and the function waitForChild.
I have to tell you: I won't leak any more code from this project, since it don't have to do with this problem and I'm a jumping wizard trying to finish it.
- As, your subject is matching the message 100.32%! |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 14 Feb 2013 07:18 AM |
Weird. By turning line 96 into a comment (Just a test, I will enable it later on), the script worked. Hm, I wonder if it has something to do with the MapEdit-BindableEvent or MapDesign-StringValue.
Well, thx u for taking a look, I'll just leave this thread alone.
Oh, and... To forum mods: Can you [ Content Delete ] the thread please? xP
- As |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 14 Feb 2013 07:22 AM |
Problem detected (I wonder why the output didn't tell):
In "updateMap()", I use waitForChild(arena, "MapBackend")... the updateMap function was simply moved from one function to it's own, to spare typing the function twice... yeah, that would be bad.
Well, "arena" is a LOCAL variable from the old function, so... it didn't exist in the new one D: What a fail. Ush, shame on me.
- As, u fail'd. |
|
|
| Report Abuse |
|
|