I have script function I am calling with an API textmessage from a roll button. As long as I do wait between clicks everything works fine but if quickly click the button twice it does shutdown my API sandbox and outputs without any error message. The script var handleSpellcastingCast = function(msg,character,spellname,id,force,basis,mod){ var castpool = basis + mod; var spell = characters.get("Zauber-"+spellname); if(spell==undefined){ whisperToGM(msg.who,msg.who," Zauber "+spellname+" nicht gefunden"); return; } var art = abilities.S(abilities.get(spell,"Art")); var category = abilities.S(abilities.get(spell,"Kategorie")); var range = abilities.S(abilities.get(spell,"Reichweite")); var damage = abilities.S(abilities.get(spell,"Schaden")); var duration = abilities.S(abilities.get(spell,"Dauer")); var drain = abilities.I(abilities.get(spell,"Entzug")); var description = abilities.S(abilities.get(spell,"Beschreibung")); // Unwrap the @{attribute} var drainattribute = attributes.I(attributes.unwrap(character,"tradition_drainattribute")); var drainmod = attributes.I(attributes.get(character,"tradition_drainmod")); var drainpool = drainattribute + drainmod; var myid = id; //Cast roll sendChat(character.get('name'), "/roll [["+castpool+"d6sacs5cs6>5kh"+force+"]]", function(x) { var RollValueCaster = x[0].inlinerolls[0]; var rollCast = buildInline(RollValueCaster, undefined, undefined); var successesCaster = parseInt(RollValueCaster["results"]["total"]); var totaldrain = Math.max(force + drain,2); sendChat(character.get('name'),"/roll [["+drainpool+"d6sacs5cs6>5]]",function(x) { var RollValueDrain = x[0].inlinerolls[0]; var rollDrain = buildInline(RollValueDrain, undefined, undefined); var successesDrain = parseInt(RollValueDrain["results"]["total"]); var draindamage = Math.max(totaldrain-successesDrain,0); whisperToGM(msg.who,msg.who,"&{template:zauber}"+ "{{text=zaubert "+spellname+"}}"+ "{{beschreibung="+description+"}}"+ "{{ks="+force+"}}"+ "{{basis="+basis+"}}"+ "{{mod="+mod+"}}"+ "{{pool="+castpool+"}}"+ "{{erfolge="+rollCast+"}}"+ "{{art="+art+"}}"+ "{{schaden="+damage+"}}"+ "{{kategorie="+category+"}}"+ "{{reichweite="+range+"}}"+ "{{entzug="+force+"+"+drain+"="+totaldrain+"}}"+ "{{entzugswiderstand="+totaldrain+"-"+rollDrain+"="+draindamage+"}}"+ "{{dauer="+duration+"}}"); }); }); }; The error message: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: