Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Insert code snippet?

3 years ago

So, I was curious this morning, and decided to play around with the text editor.

I found the code snippet thing, but I don' know if it will have any actual use.

For example(I know a bit of JS):

var a = 4;

for(var i = 0; i < 10; i++){
  if(a < 10) a++;
}

print(a);

Is this just for demonstration purposes? It doesn't seem to have any impact...

Insert code snippet?

3 years ago

That's for displaying examples of code. (Also, print() in JS is for opening the printing dialog.)

Insert code snippet?

3 years ago

Ah, I usually use console.log, in an online platform, now that I think about it, I should've used println, but yeah. 

It really is a shame that code can't be implemented into the story itself, I certainly feel that it would make life a lot easier(at least easier than the scripting). 

Thanks!