0 votes

I don't understand what the error!

Godot version 3.4
in Engine by (12 points)

Can you upload a minimal reproduction project somewhere (e.g. to a GitHub repository) and link to it here? We need more context to be able to help.

I don't really know how to do but maybe I can give you what is the error and the line of code that not work.

ERROR: Edit state is only for editors, does not work without tools compiled.
at: (scene/resources/packedscene.cpp:1642)
SCRIPT ERROR: Attempt to call function 'Normal' in base 'null instance' on a null instance.
at: Normal
state (res://Player/Ketchup.gdc:86)

Code at line 86:

var Bullet = preload("res://Bullet/Bullet.tscn")
onready var animationTree = $AnimationTree
onready var animationPlayer = $AnimationPlayer
onready var animationState = animationTree.get("parameters/playback")
onready var ray = $RayCast2D
onready var shootingPosition = $ShootingPosition
onready var ShotGunPosition1 = $ShotGunPosition1
onready var ShotGunPosition2 = $ShotGunPosition2
onready var ShotGunPosition3 = $ShotGunPosition3
onready var hitbox = $HitBox
onready var Facher = $Facher

func ready():
animationTree.active = true
health", self, "queuefree")
position = position.snapped(Vector2(tile
size, tilesize))
position = position
target_position = position

func physicsprocess(delta):
match state:

func shooting_state():
if Ketchup.shootingType == 0:
Shoot = Normal
elif Ketchup.shootingType == 1:
Shoot = ShotGun
elif Ketchup.shootingType == 2:
Shoot = SuperFire

match Shoot:
            hitbox.set_deferred("monitorable", false)
            hitbox.set_deferred("monitorable", false)
            hitbox.set_deferred("monitorable", false)

func shoot():

#match Shoot:
    #   Normal()
    #   ShotGun()
    #   SuperFire()

func Normalstate():
scale = 0.6
hitbox.setdeferred("monitorable", false)
var bullet = Bullet.instance(1)
bullet.BulletType = Normal
bullet.scale.x = 1
bullet.scale.y = 1
bullet.position = shootingPosition.global_position

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.