Lib.EternaScript doesn't parse arguments correctly

  • 1
  • Problem
  • Updated 3 years ago
For example:

f = Lib.EternaScript( 7013731 );
f(2, 'AAAA'); Return : sequence is not defined
This script has two inputs, SolveType and sequence, however only the first one is used. If we do this:

return f
 
Return : function _7013731(){Lib = new Library();var solveType=arguments[0];...//Starts script contents here
Only the first argument is defined.
Photo of LFP6

LFP6, Player Developer

  • 613 Posts
  • 109 Reply Likes

Posted 3 years ago

  • 1
Photo of Omei Turnbull

Omei Turnbull, Player Developer

  • 980 Posts
  • 308 Reply Likes
I don't know whether there is any justification for Lib.EternaScript's current implementation of parameter handling.  But since it  returns a function that you are evaluating in the context of your program, you should be able to do what you want just by defining the variable sequence before calling f.