The Daily Click ::. Forums ::. Klik Coding Help ::. Newlines
 

Post Reply  Post Oekaki 
 

Posted By Message

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
23rd May, 2006 at 18:46:24 -

How do I compare a general value with a newline 'character'? Like... If I want to check if a string contains a newline?

I've tried with Newline$, and with those two squares that MMF treats as newlines. I've even tried creating a string, and setting its alterable string to Newline$ and then comparing the string with the expression, but still it doesn't work.

Any ideas?

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
23rd May, 2006 at 22:20:50 -

MMF also treats:
"
"

(Using Ctrl+Enter? Yeah)
I have never had a problem with this method, & I've never had to use 'Newline$' so this method obviously works.

Examples:
"Hello,
This this is how I do new lines without 'NewLine$'"
or
"Hello, " + "
"This this is how I do new lines without 'NewLine$'"

Hope this helps.

 
http://www.facebook.com/truediamondgame

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
24th May, 2006 at 09:06:53 -

I had a similar problem a while ago. Here is a method I came up with to remove the first line in a string:
http://www.clickteam.com/CTforum/showflat.php3?Cat=&Board=upload&Number=287066&page=&view=&sb=&o=&vc=1
There are some comments there with alternative methods (I don't think the richedit one works all the time, though.)

I think you can also use the ascii object or similar to parse through your text and find the newline character via it's ascii number. I'm not 100% sure if that will work. Goodluck.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
24th May, 2006 at 12:01:08 -

Brandon Cassata: Yes I KNOW that. I was asking about how I compare a newline with a general value. Like comparing a string with a newline using 'compare two general values' under 'special conditions'. It doesn't work. Try it.

Assault Andy: I'll check that out, thanks.

 
n/a

Werbad



Registered
  18/09/2002
Points
  235
24th May, 2006 at 17:55:43 -

I know one way:
Make a string object with only a newline in it and compare with that
But i dont recommend this since it requires an extra object...

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
24th May, 2006 at 20:06:30 -

Well, I wouldn't bother as long as I would get it to work. But I've already tried that

Image Edited by the Author.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click