Level select does not work in Colorslide tutorial(SOLVED)

#1

I’m stuck on the Colorslide tutorial. I followed every step in the tutorial until the In Game GUI, but the level select does not work. When I click the buttons in the level select in the game, it appears a black screen and not the level i want to play.
Can someone help me, please?

0 Likes

#2

Does the console show any errors or other messages?

0 Likes

#3

Well, it shows the following warnings:

WARNING:DLIB: Profiler Engine.Init took 4.079 seconds
WARNING:DLIB: Profiler VSync.Wait took 2.419 seconds
WARNING:DLIB: Profiler Engine.Frame took 2.421 seconds
WARNING:DLIB: Profiler VSync.Wait took 2.894 seconds
WARNING:DLIB: Profiler Engine.Frame took 2.896 seconds

0 Likes

#4

I suggest that you double check all steps of the tutorial. Did you add all scripts? Nothing mistyped?

If you can’t find the problem then please zip the project and upload it here (exclude .git and the build folders!)

1 Like

#6

Here’s the project:

main.zip (11.0 KB)

0 Likes

#7

That is not a complete project. It is missing the game.project file and probably some additional files.

16

2 Likes

#8

https://drive.google.com/file/d/1AmeWhr1RJAqZ_0sDD6JiOUubUR2_vkiE/view?usp=sharing

Here’s the complete project(with buid folder and .git excluded)

0 Likes

#9

Ok, in loader.script you have an error:

function on_message(self, message_id, message, sender)
	if message_id == hash("load_level") then
		local proxy = "#proxy_level_" .. message.level
		msg.post(proxy, "load")
	elseif message.id == hash("proxy_loaded") then
		msg.post(sender, "init")
		msg.post(sender, "enable")
	end
end

Can you spot the error?

elseif message.id == hash("proxy_loaded") then

The problem is that message.id should be message_id!

4 Likes

#10

Thank you very much!
I fixed the error and it works as it should.

2 Likes