Welcome aboard Visitor...

Daily Screenshot

Server Costs Target

Time running out!

54% of target met.

Latest Topics

- Anyone still playing from a decade ago or longer? »
- Game still active. NICE! »
- Password resett »
- Darkspace Idea/Opinion Submission Thread »
- Rank Bug maybe? »
- Next patch .... »
- Nobody will remember me...but. »
- 22 years...asking for help from one community to another »
- DS on Ubuntu? »
- Medal Breakpoints »

Development Blog

- Roadmap »
- Hello strangers, it’s been a while... »
- State of DarkSpace Development »
- Potential planetary interdictor changes! »
- The Silent Cartographer »

Combat Kills

Combat kills in last 24 hours:
No kills today... yet.

Upcoming Events

- Weekly DarkSpace
03/30/24 +2.0 Days

Search

Anniversaries

No anniversaries today.

Social Media

Why not join us on Discord for a chat, or follow us on Twitter or Facebook for more information and fan updates?

Network

DarkSpace
DarkSpace - Beta
Palestar

[FAQ
Forum Index » » Basic Scripting Discussion » » /n?
 Author /n?
Barthezzz
Fleet Admiral

Joined: May 31, 2001
Posts: 5630
From: The Netherlands
Posted: 2003-02-09 04:36   
Yeah a q about scripting, In the Pushchat function in the tutorial you see /n every now and then.

Some lines of text have it at the start and end some dont have it at all and some have it either at the front or end. (See axamples below)

What does it do? (Cant find it in the scripting ref)


Quote:
pushChat( "Press the ENTER key to begin the tutorial.n" );



Quote:
pushChat( "nPress the ENTER key to continue.n" );



Quote:
pushChat( "nFor this training we will give you this free ECCM (Please do give it back afterwards =P)" );


_________________


  Goto the website of Barthezzz
chris aka sunshine
Cadet

Joined: May 29, 2001
Posts: 1649
From: Germany
Posted: 2003-02-09 04:39   
n will result in an line-break..


pushChat( "Press the ENTER n key to continue.n" );


looks like:

Press the ENTER
key to continue


_________________
Christian 'sunshine' Weyand





  Email chris aka sunshine   Goto the website of chris aka sunshine
Barthezzz
Fleet Admiral

Joined: May 31, 2001
Posts: 5630
From: The Netherlands
Posted: 2003-02-09 04:40   
Ah tnx

But if i have this:
Quote:
pushChat( "To counter the K'luth cloak you 0 need ECCM. ECCM can be bought at a starport and placed in a Special slot on your ship." );
pushChat( "nECCM raises the signature of all ships nearby. K'luth need a signature of 0 if they want to be able to fly around unseen." );
pushChat( "nFor this training we will give you this free ECCM (Please do give it back afterwards =P)" );



The pushchat things are all in diffrent lines, do they still need the /n?

_________________

Website || Fleetpage

[ This Message was edited by: Barthezzz on 2003-02-09 04:41 ]
_________________


  Goto the website of Barthezzz
Shigernafy
Admiral

Joined: May 29, 2001
Posts: 5726
From: The Land of Taxation without Representation
Posted: 2003-02-09 06:55   
I think different pushchat automatically has a line break after it. So if you have multiple pushChat()s, it would have line breaks between them.. its just an option between whether you want to have have one long pushChat(something /n something /n something) or multiples to make it a bit more readable.

So basically, assume an invisible /n at the end of the pushChat().
_________________
* [S.W]AdmBito @55321 Sent \"I dunno; the French had a few missteps. But they're on the right track, one headbutt at a time.\"

  Email Shigernafy
Barthezzz
Fleet Admiral

Joined: May 31, 2001
Posts: 5630
From: The Netherlands
Posted: 2003-02-09 07:28   
cool.
_________________


  Goto the website of Barthezzz
Chromix
Cadet

Joined: June 29, 2001
Posts: 3052
Posted: 2003-02-09 08:43   
Another difference is: Lines by pushChat() are logical blocks, so when you write a single block with 30 lines it disappears from the screen quite fast, but if you use pushChat for every single line they'll disappear one by one.
_________________


  Email Chromix
Page created in 0.011213 seconds.


Copyright © 2000 - 2024 Palestar Inc. All rights reserved worldwide.
Terms of use - DarkSpace is a Registered Trademark of PALESTAR