Author Topic: Doors and Keys  (Read 61 times)

Minefran12

  • Newbie
  • *
  • Posts: 4
    • View Profile
Doors and Keys
« 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. :)

Diarandor

  • Hero Member
  • *****
  • Posts: 758
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Doors and Keys
« Reply #1 on: October 11, 2017, 11:01:20 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()".

Minefran12

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Doors and Keys
« Reply #2 on: October 12, 2017, 02:54:27 pm »
OK, thank you.