Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

defining new functions in Edit Story JavaScript, Harlowe

$
0
0
I am not sure if I am running into some kind of intentional namespace wackiness, but I get this error:
Sorry to interrupt, but this page's code has got itself in a mess. 
@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test line 27 > eval:1:1
.globalEval@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:27:28809
domManip@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:27:12563
.append@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:30:25031
showPassage@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:49:2913
Engine.goToPassage@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:49:3440
@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:51:1611
jQuery.Callbacks/fire@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:30:2532
jQuery.Callbacks/self.add@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:30:3014
jQuery.fn.ready@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:30:6209
jQuery.fn.init@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:28:31599
jQuery@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:27:25862
@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:51:596
main@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:27:3952
_req/<@http://twinery.org/2/#stories/30dd4319-2864-e238-4884-ac4f4294faa3/test:27:4701

when I define a function, something like this
function thisIsFun(){
  alert("wtf");
}

and then in a passage insert it like so:
(print: '<script>thisIsFun();</script>')

I want to make some wacky GUI elements and best way to get them to work cleanly would be through JS, but I am not sure what's up here.

Viewing all articles
Browse latest Browse all 1844

Trending Articles