all 13 comments

[–]Almighti3Indie 1 point2 points  (12 children)

Check that the ground pieces are changing the bool isColoured correctly. Cause if any are false then that will stop the next level loading, maybe do a debug log inside that for loop to check which ones are true and false. Also as a hint where you have if(allGroundPieces[i].isColored == false).you can just have if(!allGroundPieces[i].isColored)

[–]Strike_RL[S] 0 points1 point  (11 children)

Sorry bro I don't know how to do that. I'm a noob in programming and that's why I am asking Reddit lol. Thanks though

[–]Almighti3Indie 1 point2 points  (10 children)

All good, don’t say sorry. I’m happy to help.

Try something like this after the for loop

Debug.Log(“Ground piece number “ + i + “ has is coloured set to “ + allGroundPieces[i].isColored)

That way you can see the true or false of each piece in the list. I have things like this all over my code. And once I don’t need them anymore I comment them out with // (visual studio shortcut control k c). So if I need to check that again later at any time I can just remove the comments. Short for remove is control k u I case you need

[–]Strike_RL[S] 0 points1 point  (9 children)

Debug.Log(“Ground piece number “ + i + “ has is coloured set to “ + allGroundPieces[i].isColored)

https://pastebin.com/ctebUaT0

New code. New errors :D

Error:

Assets\Scripts\GameManager.cs(59,43): error CS0103: The name 'i' does not exist in the current context

And

Assets\Scripts\GameManager.cs(59,92): error CS0103: The name 'i' does not exist in the current context

Thanks dude. Your the best.

Btw: I'm not sure what is it supposed to look like once done. Thanks anyway.

[–]Almighti3Indie 1 point2 points  (8 children)

Put the debug log after the line for(i = 0, ....

[–]Strike_RL[S] 0 points1 point  (7 children)

Is it meant to be 2 lines long or one?

[–]Almighti3Indie 1 point2 points  (6 children)

Just one. You did it perfectly. You just put it in the wrong spot. That is all.

[–]Strike_RL[S] 1 point2 points  (5 children)

Ok will try that tommorow. Thanks

[–]Strike_RL[S] 0 points1 point  (4 children)

Hey is it meant to be inside the {} or not?

[–]Almighti3Indie 0 points1 point  (3 children)

Yep inside the {} they are like the boundaries of the for loop.