Skip to main content
返回 Roblox script object 的 decompressed bytecode string。getscriptbytecode 注册到与 dumpstring 相同的 C++ function,因此行为完全相同。argument 必须是 object。共享的 bytecode reader 接受 ClassName 值 ModuleScript、LocalScript、CoreScript 和 Script。对于 Script,RunContext 必须是 Client。如果缺少 ClassName,function 抛出 “Invalid Instance”。如果 ClassName 不是受支持的 script class,则抛出 “Script expected”。如果该值是其他 RunContext 的 Script,则抛出 “Expected a Script with RunContext set to Client”。如果 embedded bytecode reference 无效,或 stored bytecode 长度为 8 bytes 或更少,function 返回 nil。否则,它会用 DecompressBytecode 解压 stored bytecode,并把 resulting bytes 作为 Luau string 返回。Hash mismatch、too-short compressed data 或 ZSTD decompression errors 会由 DecompressBytecode 作为 error text bytes 返回,而不是在这里抛出。

语法

参数

返回值

示例

Read decompressed bytecode from a supported Roblox script Instance.