This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

ERROR: Condition ' _debug_parse_err_line >= 0 ' is true.

ari484ari484 Posts: 23Member
edited May 2018 in Programming

Wassup , I am facing some problem with my 1st Godot Code.. The project is from document from the | Chapter 2. Step by Step - Your First Game| Link : https://goo.gl/8W4VXe |

CODE :

extends Area2D

export (int) var SPEED
var velocity = Vector2()
var screensize

func _ready(): 
    screensize = get_viewport_rect().size

func _process(delta) :
    if Input.is_action_pressed("ui_up") :
        velocity.x -= 1
    if Input.is_action_pressed("ui_down") :
        velocity.x += 1
    if Input.is_action_pressed("ui_right") :
        velocity.x += 1             
    if Input.is_action_pressed("ui_left") :
        velocity.x -= 1     
    if velocity.length() > 0 :
        velocity = velocity.normalized() * SPEED
        $AnimatedSprite.play()
    else :
        $AnimatedSprite.stop()  

position += velocity * delta
position.x = clamp(position.x, 0, screensize.x)
position.y = clamp(position.y, 0, screensize.y)

ERROR :

_0:00:00:0271 - Condition ' _debug_parse_err_line >= 0 ' is true. returned: 0

Type:Error
Description:
Time: 0:00:00:0271
C Error: Condition ' debug_parse_err_line >= 0 ' is true. returned: 0
C Source: modules\gdscript\gdscript_editor.cpp:287
C Function: GDScriptLanguage::debug_get_stack_level_instance

** THANKS.. :) ..

Desperately waiting for the solution..**

Best Answer

  • MegalomaniakMegalomaniak Posts: 2,580
    edited May 2018 Accepted Answer

    The > `` < signs are for inline code, you can use 4-space indentation in front of each line to get a comment block. Or alternatively highlight the code block and then select code from the Format drop-down. I fixed it for you this time. :)

    Anyways, I'm pretty sure you mean to indent your last three lines so as to include them in func _process():, right?

Answers

  • MegalomaniakMegalomaniak Posts: 2,580Admin
    edited May 2018 Accepted Answer

    The > `` < signs are for inline code, you can use 4-space indentation in front of each line to get a comment block. Or alternatively highlight the code block and then select code from the Format drop-down. I fixed it for you this time. :)

    Anyways, I'm pretty sure you mean to indent your last three lines so as to include them in func _process():, right?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.