All Questions


Robert Simms

Invalid call error

At first I thought I made a typo as I typed the code along with the video, I get an error: Invalid call. Nonexistent function 'enter' in base 'Node(' specifically here, func _ready() -> void: yield(owner, "ready") state.enter() I just was trying to run the game to see if everything was working. I tried copying the code from "Design and Code Structure" but I still get the error. Of course the project folder for Design & Code is working but I was hoping to follow along and get everything working myself. If you know what I did wrong please let me know, thanks :)
  • Nathan Lovato replied

    The error says that the node you are calling the enter function on is a StateMachine, so I would guess that you inadvertently stored the state machine node into the state variable. This could be due to the starting state node path being set incorrectly on the StateMachine node, in the inspector.

  • S
    Robert Simms replied

    That's definitely what it was. I just forgot to set the "initial state' in the inspector. Thanks for your time.