Deep Bot - Twitch Streamer Assistant

Deep Bot => Help/Support => Topic started by: xxxScorpion on June 02, 2017, 05:43:33 PM

Title: Custom Commands, Adding numerical values to a text file.
Post by: xxxScorpion on June 02, 2017, 05:43:33 PM
I'm basically looking to increase a value by a set amount and save the value back to the same file. Also I don't remember or couldnt find the list showing what commands are taken into account first.

@savefile@[read.txt,@readfile@[read.txt]+5]

So I want the value in read.txt (300) to have (5) added to it to become (305) and then save back to read.txt

I used to have it setup like that or at least the idea worked in that way.
Title: Re: Custom Commands, Adding numerical values to a text file.
Post by: Dante557 on June 02, 2017, 08:58:01 PM
@savefile@[read.txt,@calc@[+|@readfile@[read.txt]|5]]
Title: Re: Custom Commands, Adding numerical values to a text file.
Post by: xxxScorpion on June 02, 2017, 09:10:24 PM
@savefile@[read.txt,@calc@[+|@readfile@[read.txt]|5]]

Awesome thank you. I tried the calc function as well but apparently I fudged it somewhere. Appreciate it greatly.