Gdzenox
1
Hi, im making a bullet system and i get this error that i dont know how to fix.
extends Area2D
const RIGHT = Vector2.RIGHT
export(int) var SPEED: int = 200
func _physics_process(delta):
var movement = RIGHT.rotated(rotation) * SPEED * delta
global_position += movement
func destroy():
queue_free()
func _on_VisibilityNotifier2D_screen_exited():
queue_free()
func _on_Bullet_body_entered(body):
if body.is_in_group("Player"):
destroy()
Which line is the error on?
erion
3
I’d recommend you write out the full error and specify which line the error is on to make it easier to identify the problem
Gdzenox
5
Line 4:Unexpected “Identifier” in class body.
Monday
6
you’re missing the @. it should be @export
1 Like
Gdzenox
7
now i am getting this error
Line 4:Annotation "@export" requires at most 0 arguments, but 1 were given.
Monday
8
oh i think it’s because of the (int) part, try this:
@export var SPEED: int = 200
1 Like
system
Closed
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.