Lua and BASIC use the shared actions too
A Lua record returns a module table. This complete record dispatches Load selected:
local Script = {}function Script.run(context)
await(SaveGameWidgetCommand({
guiId = "save_lab",
elementId = "save_slots",
command = "load-selected",
slot = -1
}))
return true
endreturn ScriptThe equivalent BASIC record uses a Run function and a dictionary:
OPTION PCA3D BASIC 1.0FUNCTION Run(context AS Dictionary)
DIM options = {"guiId": "save_lab", "elementId": "save_slots"}
options["command"] = "load-selected"
options["slot"] = -1
AWAIT SaveGameWidgetCommand(options)
RETURN TRUE
END FUNCTIONThese are command-dispatch examples. Add a selected-slot/file-existence check when your surrounding UI needs one. Keep slot values numerical; a name such as checkpoint_1 is not a numbered slot.
