Author Topic: Problems with @target@ variable  (Read 4246 times)

0 Members and 1 Guest are viewing this topic.

lucas861223

  • Youngling
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
  • Twitch Name: lucas861223
Problems with @target@ variable
« on: December 07, 2017, 03:35:02 AM »
I'm a mod for this streamer who has deepbot and I'm trying to make a command for him. In it, I try to make a command that uses the variable @target@[start|end]. However, that variable would not work if I do not hard code the numbers in.

For instance, it works if I type @target@[1|2] literally, but will not work if I do @target@[1|@calc@[+|1|1]].
Instead of performing the same as @target@[1|2], it just gives "]", same goes to @counter@, @target@, @rand@ and everything that's not hard-coded.
I have made sure the individual part, @calc@[+|1|1], works, but when put together, it just fails.

Is this a bug or intended design? If it is intended, is it possible to change that?
« Last Edit: December 07, 2017, 04:00:48 AM by lucas861223 »

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Problems with @target@ variable
« Reply #1 on: December 08, 2017, 12:53:08 AM »
Maybe this will clear it up: @calc@[+|@target@[1]|@target@[2]]
@target@[1|2] isn't meant to have nested variables. It is just grab items after the initial command.
So with my @calc@, I can do !command 1 3. Then it will input the info like this: @calc@[+|1|3] and output 4.command.
Old Name: RepentGamingTV
Twitch: Here

Need help ASAP?
Join Deepbot's Discord: Discord.Deepbot.tv
Deepbot's Twitter: @DeepSupport

lucas861223

  • Youngling
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
  • Twitch Name: lucas861223
Re: Problems with @target@ variable
« Reply #2 on: December 08, 2017, 08:54:42 AM »
thanks for the reply, but it wasn't what I was trying to achieve
I know @calc@[+|@target@[1]|@target@[2]]

To make my question clearer - @target@[min|max] stops functioning whenever I don't hard code the numbers in, but use any variable inside it. The calc thing is just an example I tried to give.

Anyways, I still got the answer - that @target@[start|end] isn't meant to have nested variables. It kind of sucks, may I ask if it's possible to change that?