Hello, I am completely new to godot and the scripting language I think they call it GodotScript, and what i’m trying to do right now is basically I have this python code that encodes and compresses data and I’m trying to decode it and decompress it in GODOT but I can’t find the functionn to use?
This is the way im encoding and compressing in python
And this is about how far I got in my godot script
extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
var file = FileAccess.open("res://TurnAround.txt", FileAccess.READ)
var content = file.get_as_text()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
Alright well, thanks for pointing me in the right direction but I was just doing some testing and it’s giving me all these I dont even know if these are errors or if it’s even doing it correctly
Then it’s not valid utf8, what are you trying to decode? Is it compressed? Then you need to decompress it first with the class I linked, using FileAccess.get_buffer