Bayard-X said:The CanFail architecture seems interesting to me, but I seem to lack the knowledge in how to make the script then.
However, even in the current state, I am happy, because I can now do some intersting things on the ReMo.
The cf version would look like this (and would work like a normal conditional operation...if it passes, the code continues, if not it stops):
Code:
("cf_check_if_one_or_more_of_these_are_factors",
[
(store_script_param, ":number_to_check", 1), # I want to know of this number if the following are factors.
(store_script_param, ":number_of_loops", 2), # run loops
(assign, ":factors_bool",0), # initialise boolean to return
(val_add, ":number_of_loops", 3),
(try_for_range, ":i", 3, ":number_of_loops"),
(store_script_param, ":this_factor", ":i"),
(store_mod, ":check", ":number_to_check", ":this_factor"),
(eq, ":check", 0),
(assign, ":factors_bool",1),
(assign, ":number_of_loops", ":i"),
(try_end),
(eq, ":factors_bool", 1),
]),