Marshalls class not valid in Node script?

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

Attempting to use methods, such as raw_to_base64() and base64_to_raw(), in a Node script, but these are rejected with error “The method isn’t declared in the current class”.

How to use Marshalls, then?

Version 3.2.2 stable.

:bust_in_silhouette: Reply From: JimArtificer

Those functions are defined on Marshalls, not the base object type. Marshalls is defined in the global scope.

I don’t use GDScript, but using it should look something like this:

var x = Marshalls.base64_to_raw(myString);