The Daily Click ::. Forums ::. Klik Coding Help ::. Damn this expression, how do I turn it into a value!? (MMF2)
 

Post Reply  Post Oekaki 
 

Posted By Message

WillWill

Give me stuff

Registered
  24/07/2006
Points
  552
17th December, 2006 at 10:48:24 -

GroupItemString$( "Ini USERS", listGetAt$( "Queue SP", listCount( "Queue SP" )-1), "Xpos")

If you look closer at this, you will see that the listGetAt means that we are getting a string from String Parser 2. This string is the Username that I want to get the string of Xpos from. It extracts fine, but as you all can see, the whole expression prints out a string and not a numeric. I need this to be a string in many occasions, but this time I want it to be converted to a value/numeric.

I have tried to do this:

Val(GroupItemString$( "Ini USERS", listGetAt$( "Queue SP", listCount( "Queue SP" )-1), "Xpos"))

But then the calculator gives the "Mixed Strings and Numbers" error, which means that I am trying to convert a value to a value even if it already is one. I know this is kinda hard to understand, and you don't have to understand all of it (it's a part of a bigger expression), but I just can't get it to work!

Help much appreciated!

Edit: I just realized that I was debugging it in an edit box, and edit boxes REQUIRE values to be printed.. Doh.

Edit: IT WORKED! YES!! Longest damn expression ever!

IF:
Val(StrAtXY( "Array", Val(GroupItemString$( "Ini USERS", listGetAt$( "Queue SP", listCount( "Queue SP" )-1), "Xpos"))+Val(listGetAt$( "Queue SP", 2)), Val(GroupItemString$( "Ini USERS", listGetAt$( "Queue SP", listCount( "Queue SP" )-1), "Ypos"))+Val(listGetAt$( "Queue SP", 3))))
EQUALS:
1
THEN: Send "Move, <X>,<Y>" to User!

That was like.. The Array Object using the String Parser object to get info from the INI Object.

Image Edited by the Author.

 
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.
   

Post Reply



 



Advertisement

Worth A Click