Posted 21 August 2014 - 10:30 PM
I am trying to make a very big stock exchange program and it runs threw multiple files. one file I call "stock-buy-1", when activated adds 1 to a variable on a file called "stock-userAmmount" this is what I have.
stock-buy-1
h = fs.open("stock-userAmmount", "a")
h.writeLine("x = 0+1")
h.close()
stock-userAmmount
x = 0
print( x )
so basicly I want stock-buy-1 to open stock-userAmmount and add one to x = 0 so when it prints it
will go up 1 number each time I run stock-buy-1, how would I fix this?
stock-buy-1
h = fs.open("stock-userAmmount", "a")
h.writeLine("x = 0+1")
h.close()
stock-userAmmount
x = 0
print( x )
so basicly I want stock-buy-1 to open stock-userAmmount and add one to x = 0 so when it prints it
will go up 1 number each time I run stock-buy-1, how would I fix this?