Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Scripted RC (https://forums.graalonline.com/forums/showthread.php?t=68912)

cbk1994 03-04-2007 01:30 AM

just had an idea.
Since the tab button doesn't work in script editor its really hard to format code. So what about a button in the window that says 'Format Code' and does the command "/style weapon/npc/script name" or whatever the command is.

Also, found a bug.
If you open the vars and the script of a DB npc at one time, it doesn't dispaly properly (if you open script than vars, both script and vars will show the vars. if you close vars the script is correct though.)

Skyld 03-04-2007 01:37 AM

Quote:

Originally Posted by cbkbud (Post 1284230)
Also, found a bug.
If you open the vars and the script of a DB npc at one time, it doesn't dispaly properly (if you open script than vars, both script and vars will show the vars. if you close vars the script is correct though.)

That's one I already know of (it's listed in the bugs list on the other thread):
Quote:

There are a couple of currently known bugs, which will probably be fixed when I next release the script: [...] NPC attributes and NPC scripts are not always working properly when opened at the same time

Riot 03-04-2007 10:21 AM

Quote:

Originally Posted by cbkbud (Post 1284230)
just had an idea.
Since the tab button doesn't work in script editor its really hard to format code. So what about a button in the window that says 'Format Code' and does the command "/style weapon/npc/script name" or whatever the command is.

I guess I'll post a bug/warning about the "style" command:

If you have padding enabled on operators it will cause syntax errors if you use var @= "something"; as it places a space between @ and =.
Example:

HTML Code:

function onCreated() {  this.var += 1;
  this.test @= "test";}

Becomes:
HTML Code:

function onCreated()
{
  this.var += 1;
  this.test @ = "test";
}

(note the space between @ and =)

scriptstyle=spaces=2,padding=oper,brackets=break is used in this example.

I assume its the same for some other operators added in GS2.

cbk1994 03-04-2007 03:20 PM

Well, it's one step closer to being able to style code in the scripted rc.
Quote:

Originally Posted by Riot (Post 1284490)
I guess I'll post a bug/warning about the "style" command:

If you have padding enabled on operators it will cause syntax errors if you use var @= "something"; as it places a space between @ and =.
Example:

HTML Code:

function onCreated() {  this.var += 1;
  this.test @= "test";}

Becomes:
HTML Code:

function onCreated()
{
  this.var += 1;
  this.test @ = "test";
}

(note the space between @ and =)

scriptstyle=spaces=2,padding=oper,brackets=break is used in this example.

I assume its the same for some other operators added in GS2.



All times are GMT +2. The time now is 06:50 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.