Skip to content

Problem with variables in Godot 4.4 #400

@KaiSD

Description

@KaiSD

What Happened

I was trying to use Block Coding in Godot 4.4 Stable.

As a test, I created a 2d node, created a variable at start and tried to access it in "every frame".

For all kinds of variables I'm getting the same error, that looks like this:

  1. For trying to use numerical variable (float or int) in calculation or condition: "Parser Error: Invalid operands "Node" and "float" for "-" operator."
  2. For trying to getvalue from Vector2: "Invalid access to property or key 'y' on a base object of type 'null instance'."

I looked at the generated code, and seen that variable's name in the gnerated code in soce situations left as "(%s)".

Image

How to Reproduce

  1. Set the variable when starting
  2. Try "variable = variable - 1" or "variable = variable + 1" in every frame block.
  3. In resulting code some variable names will be left as (%s), and the code will not work.

Block Coding Plugin Version

v0.10.0

Godot Engine Version

v4.4 Stable

Operating System

No response

Logs or command-line output

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions