Author Topic: Convert small int to integer?  (Read 1543 times)

Roni86

  • Guest
Convert small int to integer?
« on: June 28, 2018, 12:13:16 PM »
Hi all,
I have a problem with integer variabels.
The plugin needs an integer, but i
have only a small integer var. I get always an error message.
How can i convert an small int to int?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Convert small int to integer?
« Reply #1 on: June 28, 2018, 11:02:43 PM »
If you're running the beta(v1.7.0.2 and up), you can use the new "Convert a Variable Value" action to do this directly.

Otherwise, you'll want to use the "Set an Integer Value" action; Select the "Convert Text/Token" option, and enter the name of your variable embedded in the "{SMALL:}" token.

E.G.
Code: [Select]
Set integer [myVariable] value to the converted value of {SMALL:myVariable}


Though, I'd recommend using integer values in your profile as well, as small integers offer no real benefits, and are set to be deprecated at some point.

Roni86

  • Guest
Re: Convert small int to integer?
« Reply #2 on: June 30, 2018, 06:04:06 AM »
Hi Pfeil.

i tried the same token on Thursday, but it didn't work.
 So I was not sure if it was correct.

Today i've tried it again and it works, so may be a type mistake (you should not prog after a long working day  ;D).

Many thanks for your help.
Ronin