get_node(...).set_text(...) misbehaving

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nymb

Hey, im having a problem with the get_node(…).set_text(…) combo. In every aspect it is working fine, but for some reason in one part of my menu it is misbehaving.
On my player stats display i have some sub stats based on the main stats, like attack based in the player strenght, when i change the player Main Stats the sub stat make the calculations and recalibrate by it self and this is working fine (i constantly check in the output printing every stat and substat) but my in game “character sheet” lable node, way of checking just dont get the right number, For exemple: My hit points is showing the right numbers in both in game sheet lable node and output tab, but the attack just show a random number (shoulf be 124 and is showing 9) that dont even make sense, and it is the right number in the output tab, the dodge statistic just miss by 1 (40 to 41).

This is the way that im geting the numbers to show in the “character sheet lable node”:

get_node(path_statistics + "ASPD/Value").set_text(str(player.attack_speed))
get_node(path_statistics + "Critical/Value").set_text(str(player.critical))

where “player” is a var to my “onready var player = get_node(”…/…/player").

Anyone have any ideia how to solve my problem ? this has been disturbing me for days now. Ty.

Edit: as asked by GameSpy, this is the print () function:

if Input.is_action_just_pressed("Slot 4"):
	print("Level:",level)
	print("ASPD:",attack_speed)
	print("CRIT:",critical)

and this are the variables:

var level
export(float) var attack_speed
export(float) var critical

this funcion is already in my player script in my player node as are those variables

Not enough information.Show us the print() function as well. Make sure that both the print and set_text use the same player node.

GameSpy | 2020-08-11 21:14

More information added to the question

Nymb | 2020-08-12 23:30