Author Topic: Custom Commands, Adding numerical values to a text file.  (Read 1426 times)

0 Members and 1 Guest are viewing this topic.

xxxScorpion

  • Youngling
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
  • Twitch Name: xxxScorpion
Custom Commands, Adding numerical values to a text file.
« 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.

Dante557

  • Advisor
  • Councilor
  • **
  • Posts: 555
  • Karma: +26/-0
  • Sometimes Helpful, Sometimes Not :D
    • View Profile
    • My Twitch Page
  • Twitch Name: Dante557
Re: Custom Commands, Adding numerical values to a text file.
« Reply #1 on: June 02, 2017, 08:58:01 PM »
@savefile@[read.txt,@calc@[+|@readfile@[read.txt]|5]]
If you need to get through to me you can try to contact me on Twitter @ http://www.twitter.com/dante556

xxxScorpion

  • Youngling
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
  • Twitch Name: xxxScorpion
Re: Custom Commands, Adding numerical values to a text file.
« Reply #2 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.