- Joined
- Aug 31, 2009
- Messages
- 31
I'm trying to create shop based bag system using hashtable.
Every time unit gets an item (exept when you get item from the shop) triger must save charges and add the item to shop unit in count of charges.
When you buy item from shop-bag triger must reduce saved count of charges until it become 0. After that item is removed from the sale.
So I create this - View attachment hashproblem.w3x (by the way, you can not buy from the store if you have no money. Use greedisgood)
For some reason it goes insane when I pick more then 4 items of the random type and trying to buyout them. (May be because of Key(string)/10000)
And give me some wierd count of item sold but variable responsible for this remains normal. (It can be because buying triger starts before item is sold and that explain why count of items in the shop can differ from the variable by 1 but sometimes it give me very strange numbers.)
Please tell me where is the problem because I cant see it...
Every time unit gets an item (exept when you get item from the shop) triger must save charges and add the item to shop unit in count of charges.
When you buy item from shop-bag triger must reduce saved count of charges until it become 0. After that item is removed from the sale.
So I create this - View attachment hashproblem.w3x (by the way, you can not buy from the store if you have no money. Use greedisgood)
For some reason it goes insane when I pick more then 4 items of the random type and trying to buyout them. (May be because of Key(string)/10000)
And give me some wierd count of item sold but variable responsible for this remains normal. (It can be because buying triger starts before item is sold and that explain why count of items in the shop can differ from the variable by 1 but sometimes it give me very strange numbers.)
Please tell me where is the problem because I cant see it...