Thanks! A bit mind blowing for me as is but slowly catching on.
New question.
I've made a command chain for a lottery drawing. If the user fails to win the lottery goes up by 25 via @savefile@ and @readfile@ so the number can be maintained and displayed on screen. Everythings perfect except when the lottery hits 1000 another failed attempt wipes any information in the text file leaving a blank display. When used again if failed, 25 points are added back to the lottery and goes up from there. Is there an issue on my end or something with @calc@?
Lottery won command chain:
!lottery
@if@[>=||@rand@[0,100]||100||!lottery2||!lottery4]
!lottery2
@editpoints@[@user@|@readfile@[custom logs/lottery/jackpot.txt]] You've won the Jackpot of @readfile@[custom logs/lottery/jackpot.txt]! You now have @points@ coins!
Chain: !lottery3
!lottery3
@savefile@[lottery/jackpot.txt,500] The Jackpot is now 500.
Lottery lost command chain:
!lottery
@if@[>=||@rand@[0,100]||100||!lottery2||!lottery4]
!lottery4
@savefile@[lottery/jackpot.txt,@calcpost@[+,25,@readfile@[custom logs/lottery/jackpot.txt]]]!lottery5
!lottery5
Unfortunately you've lost. The Jackpot is now @readfile@[custom logs/lottery/jackpot.txt]!
Once again, the command chain on both sides works fantastically however once a the 1000 threshold it seems to reset.
**just tested with
@savefile@[lottery/1000.txt,@calcpost@[+,25,@readfile@[custom logs/lottery/1000.txt]]]
and a value of 1,025 displayed but once entered again reset to nothing.