Aller au contenu

Photo

REQUEST: [dascript]Your code here![/dascript]


12 réponses à ce sujet

#1
Sunjammer

Sunjammer
  • Members
  • 925 messages

The NWN forums has [code=auto:0] and [nwscript] tags. The latter also makes an attempt at syntax highlighting (however the config/definitions file is incomplete/out of date). Given that dascript is going to present the same issues when trying post scripts and snippets we will need a similar feature in these forums and in group/project discussions.

 

If it helps Byran has the current GeSHi config file for dascript which will not only handle the syntax highlighting but will link to the function's page in the wiki.

 

An alternative would be to provide a dedicated pastebin subdomain like the nwn one (nwn.pastebin.com) but this would cause me to use the sad emoticon.

 



#2
Sunjammer

Sunjammer
  • Members
  • 925 messages



#3
Ranlas

Ranlas
  • Members
  • 96 messages
Perhaps it would be prudent to refactor the [code=auto:0] tag to take a parameter? Like [code=nwscript] or [code=dascript]? Then the forum code is extensible for future games.

#4
Jesse van Herk

Jesse van Herk
  • BioWare Employees
  • 514 messages
We need to get equivalents of all of the old bbcode-style stuff in place - adding this to our backlog, but it likely won't get done for some time. :/

#5
Sunjammer

Sunjammer
  • Members
  • 925 messages
Will the bbcode-style be available universally, i.e. for group/project discussions, comments, blogs, etc. as well as the forums?

#6
Jesse van Herk

Jesse van Herk
  • BioWare Employees
  • 514 messages
Sunjammer: no clue yet :P

#7
Sunjammer

Sunjammer
  • Members
  • 925 messages
Obviously it would be better from the user experience (one rule to ring them all etc.) however I appreciate that the forum is the priority and there are probably more pressing fixes and new features.

#8
Jesse van Herk

Jesse van Herk
  • BioWare Employees
  • 514 messages
this might work now, it's hard to say.<br />
[dascript]int main(){ doStuff() };<br />

it appears to be being parsed alright, but isn't being highlighted.  We'll work on it!

[/dascript]

Modifié par Jesse van Herk, 16 septembre 2009 - 06:22 .


#9
Sunjammer

Sunjammer
  • Members
  • 925 messages
void main()

{

    object oTest = GetObjectByTag("test_object")

}


Modifié par Sunjammer, 28 septembre 2009 - 01:00 .


#10
Sunjammer

Sunjammer
  • Members
  • 925 messages
The code tag appears to change the font and avoids adding extra HTML line break tags but leading white space is suppressed. The nwscript and dascript don't work so there is no box out and no syntax highlighting.

#11
Jassper

Jassper
  • Members
  • 571 messages
[code]
void main()
{
    if(DoesItWork())
       return;
    else
       TryTryAgain();
}
[/code]

 Useing the standard for, code seems to work without adding extra lines.

And you get weird things if you edit the post, before edit the code and /code were not visable, not they are after editing.

Modifié par Jassper, 28 septembre 2009 - 02:46 .


#12
Jassper

Jassper
  • Members
  • 571 messages
Useing quick reply, you get extra lines



void main()
{
    if(DoesItWork())
       return;
    else
       TryTryAgain();
}




#13
Sunjammer

Sunjammer
  • Members
  • 925 messages
The extra lines issue occurred when the "fixed" the opposite issue (i.e. line breaks/paragraphs being removed) with the Standard Editor.