All Questions


posted to: Drawing Rooms

"Unable to iterate on object of type 'Object'."

Hi, I'm having an issue on the iteration for drawing the rooms in the player ship. In the function _ready_not_editor_hint(), the line "for point in room:" returns "Unable to iterate on object of type 'Object'.", and the game crash. I reviewed all the scripts and compared with the tutorials, and cannot find the error. Someone else is having this issue?


  • R
    Răzvan Cosmin Rădulescu(razcore) replied

    Hey LaloGamer, you get this error only if:

    1. You didn't attach the script or the proper script to the Room nodes. Don't confuse and
    2. You made a mistake in the names of the _iter*() functions. Maybe you forgot about the underscore or something like that

    Please review the Coding the room’s iterator functions sub-chapter. You can further read about them in the official docs. If none of this helps you'll have to give us your project to take a look at the code and setup otherwise it'll be very difficult to debug this.