The Daily Click ::. Forums ::. Klik Coding Help ::. a string read as a command
 

Post Reply  Post Oekaki 
 

Posted By Message

jpSoul



Registered
  25/10/2003
Points
  1714
18th October, 2007 at 12:09:00 -

hello

with MMF2 is it possible to have a string read as an expression??

example:
a string object called "text" contains the string "Y( 'p1' )-1"

I set the Y position of my p1 object to the content of the string "text"


of course if I try to do that it says "syntax error"... is there an extension to do something like this??

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
19th October, 2007 at 06:34:21 -

Use the Val() function to get the value out of a string. I don't know if it would evaluate your expression, but it's worth a try.

Like this:
Val("Y( 'p1' )-1")

 
Old member (~2004-2007).

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
19th October, 2007 at 06:36:17 -

I'm pretty sure that won't work.

Image Edited by the Author.

 
a/n

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
19th October, 2007 at 14:25:50 -

so am I.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

waffleton



Registered
  20/04/2007
Points
  794
19th October, 2007 at 14:41:27 -


Originally Posted by DaVincothy [Ectoprothy]
Use the Val() function to get the value out of a string. I don't know if it would evaluate your expression, but it's worth a try.

Like this:
Val("Y( 'p1' )-1")


Hah, my first thought too.
Doesn't work though. Nope.

 
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
19th October, 2007 at 18:20:18 -

Image

 
http://www.facebook.com/truediamondgame

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
19th October, 2007 at 18:33:35 -

That's nice... and pretty much the opposite of what was asked.

 
Old member (~2004-2007).

waffleton



Registered
  20/04/2007
Points
  794
19th October, 2007 at 19:11:09 -

Drugs are bad.

 
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
20th October, 2007 at 01:39:56 -


Originally Posted by DaVincothy [Ectoprothy]
That's nice... and pretty much the opposite of what was asked.



How do you consider it the opposite if it mentions both String( ) and Val( ), not to mention it's proper syntax.

 
http://www.facebook.com/truediamondgame

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
20th October, 2007 at 05:44:56 -

What Phanoo wants is to have an existing string and use that to set position of an object or use other commands.
What you do is to display the position the object already has.

Yeah, it's pretty much the opposite.

 
This space is for rent

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
20th October, 2007 at 06:52:49 -

That, and everyone saw that it wouldn't work on expressions, anyway.

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click