Home   Help Search Login Register  

Author Topic: ctrltext to number problems  (Read 503 times)

0 Members and 2 Guests are viewing this topic.

Offline SilentHunter

  • Members
  • *
  • frozen leg'o'lamb (every gamers most loved weapon)
ctrltext to number problems
« on: 09 Apr 2004, 18:34:03 »
Does anyone know how to extrat info from a textbox as a number, NOT A STRING,

the problem i have is that i try to multiply pi, (3.14159) by the diameter entered into a text box...

_diameter = (ctrlText 100)
_Circ         = (pi*_diameter)

...However upon doing so it errors and says...

'_Circ = (pi*_diameter)|#|': Error *: Type array, expected number

Thanks in advance

SILENTHUNTER
[size=4.5]NERDS HAVE FEELINGS TOO! [/size] [size=2.5]*adjusts glasses*[/size]

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:ctrltext to number problems
« Reply #1 on: 09 Apr 2004, 19:46:11 »
Hmmmmm.........

Try curled braces:

_Circ = {pi*_diameter}


Planck
I know a little about a lot, and a lot about a little.

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:ctrltext to number problems
« Reply #2 on: 09 Apr 2004, 21:42:27 »
I think this does it, if not Plancks suggestion:
_diameter = call format [""+ctrlText 100]

There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Offline SilentHunter

  • Members
  • *
  • frozen leg'o'lamb (every gamers most loved weapon)
Re:ctrltext to number problems
« Reply #3 on: 10 Apr 2004, 01:11:40 »
Thanks everyone for your time

Especially MI_Fred

worked perfectly, i never knew that a construction of commands such as that would have any meaning to flashpoint,

well now i know better

Thanks again guys, job well done

 :cheers:

SILENTHUNTER
[size=4.5]NERDS HAVE FEELINGS TOO! [/size] [size=2.5]*adjusts glasses*[/size]