FANDOM


save.LoadSolutionByName Edit

Function
bool save.LoadSolutionByName(string name)
Description
Load the highest scoring solution by name.
V1 Function Name
New to V2

save.LoadSolutionByName loads the specified named solution. The solution name can be assigned manually or using save.SaveSolution. The function returns true if it successfully loaded the indicated solution, or false otherwise.

For example,

res = save.LoadSolutionByName (  "triple starter kit" )
print ( "load success =  " .. tostring ( res ) ) 

loads the specified saved solution if it exists.

Automatically generated solutions may appear in the Open/Share Solutions dialog, but these solutions can't be loaded by save.LoadSolutionByName.

For example,

res = save.LoadSolutionByName (  "Autosaved Very Best Soloist Solution" )
print ( "load success =  " .. tostring ( res ) ) 

does not load the specified solution. The function Foldit Lua Function absolutebest.Restore could be used instead.

Community content is available under CC-BY-SA unless otherwise noted.