Plot:Run script by ID

From OHRRPGCE-Wiki

Jump to: navigation, search
run script by ID (id, argument1, argument2, argument3...)

To making switching between scripts easier, you can call a script by its ID number. Pass arguments after the ID as normal. The script can also return a value as normal. -1 is returned if the script does not exist. Yuo can pass up to 31 arguments to the script.

No check on the correct number of arguments can be performed, so default arguments are not used.

[edit] Examples

plotscript,scriptcallingtest,begin
  show value (run script by id (@sum, 1, 2, 3))
end

script,sum,a,b,c,begin
  return(a+b+c)
end
Personal tools