Author Topic: Getting Int from CMD not working  (Read 5223 times)

srm

  • Guest
Getting Int from CMD not working
« on: December 12, 2016, 09:32:39 AM »
Tried:
Write ' {CMD}' to log
Set integer [myValue] value to the converted value of {TXTNUM:"{CMD}"}
Write ' {INT:myValue}' to log

Use nested tokens checked.
Version 1.6.1 in use.

The first blue string prints out the correct results (test 1)
Then the set integer generates an error: Integer token could not be converted : {TXTNUM:"{CMD}"}
Which results in the second blue string saying "Not set"

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Getting Int from CMD not working
« Reply #1 on: December 12, 2016, 09:46:43 AM »
Don't have a v1.6.1 install to test with, but this works fine in beta v1.6.1.4.

srm

  • Guest
Re: Getting Int from CMD not working
« Reply #2 on: December 12, 2016, 09:55:54 AM »
Tried with 1.6.1.4 beta...still doesn't work.

In the instruction "set an integer value", should the value: {TXTNUM:”{CMD}”}
be placed in the slot "another variable" or in "convert text/token"?
« Last Edit: December 12, 2016, 10:03:08 AM by srm »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Getting Int from CMD not working
« Reply #3 on: December 12, 2016, 10:08:27 AM »
"Convert Text/Token".

However, note that
Code: [Select]
and
Code: [Select]
"Are completely different characters, only the latter will work.

srm

  • Guest
Re: Getting Int from CMD not working
« Reply #4 on: December 12, 2016, 10:15:28 AM »
Copied your symbol and it works.
So, which is which?
I only have one set of double quotes on my keyboard.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Getting Int from CMD not working
« Reply #5 on: December 12, 2016, 10:19:30 AM »
{TXTNUM:"{CMD}"}
Is correct(ASCII 34).

{TXTNUM:”{CMD}”}
Is not(ASCII 148).

srm

  • Guest
Re: Getting Int from CMD not working
« Reply #6 on: December 12, 2016, 10:24:59 AM »
Ahhhh!
Just retyped it for the zillionth time.
Works.
Don't know where the error crept in, but I'm glad you were able to correct my mistake.
Thank you!

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Getting Int from CMD not working
« Reply #7 on: December 12, 2016, 10:50:12 AM »
I'm thinking what happened is when you copied it from whatever I emailed, the quotes were copied in incorrectly (web-based browsers will do that a lot).

Good catch, Pfeil!