Author Topic: Need Help with a command  (Read 1192 times)

0 Members and 1 Guest are viewing this topic.

pyromanci

  • Youngling
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
  • Twitch Name: pyromanci
Need Help with a command
« on: September 01, 2016, 12:01:59 AM »
I'm trying to work on a command that lets me change an OBS on screen counter.

The way the command is suppose to work is Mods are able to Add and subtract from the counter and never let it go below 0.

Reading through the custom commands. I created this command:

Code: [Select]
@if@[<||@calc@[+|@readfile@[Beats\@user@.txt]|@target@[1]]||0||@savefile@[Beats\@user@.txt,@calc@[+|@readfile@[Beats\@user@.txt]|@target@[1]]]||@savefile@[Beats\@user@.txt,0]]
I then went in to "C:\DeepBot\custom logs" and created a folder called Beats. Then ran command, but no file was created.

The syntax looks correct to me. So i'm not sure why there is not file.

TheNumbLock

  • Advisor
  • Councilor
  • **
  • Posts: 4776
  • Karma: +137/-5
    • View Profile
  • Twitch Name: TheNumbLock
Re: Need Help with a command
« Reply #1 on: September 01, 2016, 01:50:31 AM »
I think the problem is, because there is no @user@.txt file to read from, it fails. So maybe add another @if@ or chain command before this one to @savefile@[Beats/@user@.txt,0]
Old Name: RepentGamingTV
Twitch: Here

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