javascript - Apps Script Custom Function- Internal Error -


i've started playing around apps script. opened new spreadsheet, accessed script editor, , wrote following simple function:

function doubles(num) {   return num * 2; } 

i saved script, refreshed browser , used function in cell:

=doubles(1) 

the correct answer (2) appeared in cell, replaced 1 argument 2. gets weird. upon changing said argument, got #error answer: "internal error executing custom function." when changed argument 1, however, error persisted. then, when decided try 2 again, got correct 4 response. having tried multiple times, refreshing/replacing spreadsheet, , scratching head i'm leaving trenches, i'm unsure why function appears work 30-50% of time. i've tried other cells, other argument numbers, etc. seems toss-up whether i'll end answer or error.

there appears recently-introduced bug in handling of google apps script custom functions.

this apparently subject of issue 5222. (i "apparently" because issue report isn't clear. enough.) star more attention on it, , receive updates.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -