Sg2.9
"console" is not defined ??
Recent RSS
"console" is not defined ??
From:  Zed
Date:  9. February 2012, 12:26

Hello,

I'm just getting started with making scripts for Sg and already in a weird situation :)

With this script:

for (var i = 1; i <= 10; i++) {
console.log('We are looping', i, 'times');
}

Sg's console says:

ReferenceError: "console" is not defined.
at My Scriptstesting.js:2

Has the console call changed or something? I'm on the latest version.

Thanks!

Re: "console" is not defined ??
From:  pqbd
Date:  9. February 2012, 23:37

Your code works fine for me. Have you tried testing it in the console itself?

Re: "console" is not defined ??
From:  Zed
Date:  10. February 2012, 10:20

If I try it directly in the console, it says:

InternalError: syntax error (console#1)

However, following some tutorials on the site I noticed that sometimes the code to debug is based on function print(), instead of console.log. That works fine for me, so I'll stick to that.

Anyway, I'm terribly curious about console not working, seems pretty weird, even more knowing that it does work for you... hmmm...

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Stroke <-> Fill 09.01.08