Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 04/13/08 01:04

coool
Member
From: China Haikou
Registered: 02/12/08

How to show messages in a row?

For example,
I use this codes:


func scf
{
if (srf eq  0) dmsg "Your score is 0"
if (srf eq  1) dmsg "Your score is 1"
if (srf eq  2) dmsg "Your score is 2"
if (srf eq  3) dmsg "Your score is 3"
if (srf eq  4) dmsg "Your score is 4"
if (srf eq  5) dmsg "Your score is 5"
if (srf eq  6) dmsg "Your score is 6"
if (srf eq  7) dmsg "Your score is 7"
if (srf eq  8) dmsg "Your score is 8"
if (srf eq  9) dmsg "Your score is 9"
}

func scs
{
if (srs eq  0) dmsg "0"
if (srs eq  1) dmsg "1"
if (srs eq  2) dmsg "2"
if (srs eq  3) dmsg "3"
if (srs eq  4) dmsg "4"
if (srs eq  5) dmsg "5"
if (srs eq  6) dmsg "6"
if (srs eq  7) dmsg "7"
if (srs eq  8) dmsg "8"
if (srs eq  9) dmsg "9"
}


I want to show message lick this :
Your score is 1 0

but I use this:

fork scf
fork scs

it shows like this:

Your score is 1
         0


how to make them in a row?

Offline

#2 04/13/08 02:04

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: How to show messages in a row?

Each dmsg is a new line.
A problem with the engine is that there are no string functions. No concactations, no string<=>integer, no nothing.

A workaround would be to display on multiple lines

Your score is
1 win and
0 losses


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#3 04/13/08 02:04

Gumby
Member
From: Seattle, WA, USA
Registered: 08/30/07

Re: How to show messages in a row?

*sigh*
...I know another solution. It won't be the prettiest, but it will be functional. In the morning I'll try to whip up the proper script...


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

Board footer

Powered by FluxBB