Hi everyone, i need help for finish auto price functions and i don't know what i missed
SaveFilePrice functions works fine but when i add same items again , it don't read file for auto price, so there is problem with ReadFilePrice functions.
My 2 functions in uiofflineshopbuilder :
Code
- + def ReadFilePrice(self,vnum,count):
- d = "shops"
- if not os.path.exists(d):
- os.makedirs(d)
- oldPrice=0
- n=d+"/"+str(vnum)+"_"+str(count)+".txt"
- if os.path.exists(n):
- fd = open( n,'r')
- oldPrice=int(fd.readlines()[0])
- return oldPrice
- def SaveFilePrice(self,vnum,count,price):
- d = "shops"
- if not os.path.exists(d):
- os.makedirs(d)
- n=d+"/"+str(vnum)+"_"+str(count)+".txt"
- f = file(n, "w+")
- f.write(str(price))
- f.close()
In def AcceptInputPrice(self):
i added :
in def OnSelectEmptySlot(self, selectedSlotPos):
i added :