Example: I have created a clicker game and I want the values of "1000" to be output as "1k".
How to output a different value?
Asked Answered
str(x / 1000) + "k"
Tungus Parse Error: Identifier "x" not declared in the current scope.
How much coding experience do you have?
extends Node2D
var points = 0
func _ready():
$Label.text = str(points)
func _on_texture_button_pressed():
points+= 1
$Label.text = str(points)
Tungus Very very small
Replace:
str(points)
with:
str(points / 1000) + "k"
© 2022 - 2024 — McMap. All rights reserved.