Lib.EternaScript doesn't parse arguments correctly

  • 1
  • Problem
  • Updated 4 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

  • 637 Posts
  • 109 Reply Likes

Posted 4 years ago

  • 1
Photo of Omei Turnbull

Omei Turnbull, Player Developer

  • 1026 Posts
  • 332 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.