Solarus-Games English Forum

Solarus => Development => Topic started by: Minefran12 on October 11, 2017, 09:36:24 PM

Title: Doors and Keys
Post by: Minefran12 on October 11, 2017, 09:36:24 PM
I'm making the typical door that must be opened whith a small_key and the console give me this errors.
I wonder if someone could help me, its my first game and I'm a noob on programming.
I attach the scrips and the errors.

PD: Sorry if I make mistakes of spealing or something else, i dont have a very high level of English. :)
Title: Re: Doors and Keys
Post by: Diarandor on October 11, 2017, 11:01:20 PM
Quote from: Minefran12 on October 11, 2017, 09:36:24 PM
I'm making the typical door that must be opened whith a small_key and the console give me this errors.
I wonder if someone could help me, its my first game and I'm a noob on programming.
I attach the scrips and the errors.

PD: Sorry if I make mistakes of spealing or something else, i dont have a very high level of English. :)

-The first error (related to "create_door") seems to be in a different script. As the error says, the first argument you are using in that function is of wrong type or missing. You should post that script if you need more help.
-The second error points out that the function "game:add_small_key()" is not defined. You forgot to define it somewhere in some other script.
-There is a typo in left0.lua, line 15: the variable "smal_key1" should be called "small_key1". Also, the last block of code (the one of the "for" loop) should be inside the function "map:on_opening_transition_finished()".
Title: Re: Doors and Keys
Post by: Minefran12 on October 12, 2017, 02:54:27 PM
OK, thank you.