Doors and Keys

Started by Minefran12, October 11, 2017, 09:36:24 PM

Previous topic - Next topic
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. :)

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()".
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."