Icon representing a recipe

Recipe: packing importance 2 for devprev 2020-11

created by zo3xiaJonWeinberg

Profile


Name
packing importance 2 for devprev 2020-11
ID
104071
Shared with
Public
Parent
None
Children
None
Created on
October 29, 2020 at 23:55 PM UTC
Updated on
October 29, 2020 at 23:55 PM UTC
Description

upcoming update

Best for


Code


print("success: "..tostring(pcall(behavior.SetPackingImportance, 2))) print("Packing importance can only be set through a recipe.") print("The 'recipe score modding' checkbox in the behavior panel must be checked, or behavior.SetPackingImportance generates an error.") print("Errors of this type terminate the recipe unless the pcall function is used. See the article Using pcall to trap Lua errors for more on using pcall.")

Comments


zo3xiaJonWeinberg Lv 1

I made this recipe in advance, and today I got output of success:true on Rosetta Decoy. Make sure to click the Show Output button that looks like a Terminal. When you just click the recipe, it changes the setting immediately and looks like nothing happens. However, now that the function is in place, my output says true instead of false, but it says so even if Recipe Score Modding is unchecked. If you open the behavior tab you'll be able to check the box and see the text turn red after you run the script.