Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-04-2007, 10:21 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by cbkbud View Post
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.
Reply With Quote
  #2  
Old 03-04-2007, 03:20 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Well, it's one step closer to being able to style code in the scripted rc.
Quote:
Originally Posted by Riot View Post
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.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:45 AM.


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