Author Topic: Can't get {SPOKENCMD:value} working  (Read 1350 times)

Dee

  • Guest
Can't get {SPOKENCMD:value} working
« on: May 25, 2018, 09:08:53 AM »
When I run the following command, {SPOKENCMD:2} writes the corresponding command to the log, but {SPOKENCMD:num} is blank/not set.

Code: [Select]
spoken command: last [2..5]

Set integer [num] value to the converted value of {CMDSEGMENT:1}
Write '[Blue] {SPOKENCMD:2}' to log
Write '[Blue] {SPOKENCMD:num}' to log

Am I doing something wrong?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Can't get {SPOKENCMD:value} working
« Reply #1 on: May 25, 2018, 09:25:02 PM »
"{SPOKENCMD:}" doesn't take integer variables, only literal values.

You'll need to use the "{INT:}" token to get the value from your variable first:
Code: [Select]
Set integer [num] value to the converted value of {CMDSEGMENT:1}
Write '[Blue] {SPOKENCMD:{INT:num}}' to log

Dee

  • Guest
Re: Can't get {SPOKENCMD:value} working
« Reply #2 on: May 26, 2018, 06:26:35 AM »
Thank you very much Pfeil :)