I would like the bots.txt to be read as an int instead of an str. However none of the videos i find on the internet help, or go into major detail on how I can solve this issue.
Here is my code
import time
import os
import random
os.system('mode 88,30')
with open('B://JakraG2//.Bots//bots.txt', 'r') as f:
aaa = f.read()
counter = aaa
while True:
time.sleep(0.05)
print("Added 1 to bots.txt")
counter = counter + 1
lel = "{}".format(counter)
with open('B://JakraG2//.Bots//bots.txt', 'w') as f:
f.write("{}".format(lel))
Here is the error
Traceback (most recent call last):
File "loader.py", line 16, in <module>
counter = counter + 1
TypeError: can only concatenate str (not "int") to str
bots.txt
0
counter = int(aaa)andf.write(f"{counter+1}")(get rid of the counter increments and the other interactions with lel etccounter = int(aaa)counter=int(counter)+1