Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 631 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem with starting new lines in strings #156674
09/24/07 11:30
09/24/07 11:30
Joined: Aug 2005
Posts: 390
Florida
O
oldschoolj Offline OP
Senior Member
oldschoolj  Offline OP
Senior Member
O

Joined: Aug 2005
Posts: 390
Florida
Hi folks,
I can't figure out what I'm doing wrong here..
\n is a line feed so putting it before something should put it on a new line right?
example:
STRING* somestring = "Hello \nand goodbye";

the problem is when I display this it just displays the line with the "\n"

Here is the code:
TEXT* icon_text_stat_0000 = {string = icon_string_stat_0000; font= lucida_console8; layer=4;}

STRING* icon_string_stat_0000 = "blade lvl1 \ndamage 1227 \nspeed 1.8";

It looks like that should work just fine? or not, lol.

so i searched the forums a bit and found I could do this as well:

STRING* icon_string_stat_0000 = "blade lvl1
damage 1227
speed 1.8";

but all that does is display it on one line, and it adds "\n" in front of the words damage, and speed....

Any thoughts?

Thanks!


you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe. __________________________________ yours truly
Re: problem with starting new lines in strings [Re: oldschoolj] #156675
09/24/07 14:15
09/24/07 14:15
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Try

STRING* icon_string_stat_0000 = str_create("blade lvl1 \ndamage 1227 \nspeed 1.8");


Always learn from history, to be sure you make the same mistakes again...

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1