added meat to project (150 grams)
meat (300 grams used of 150 grams needed)
dried dung (133 grams used of 133 grams needed)
ERROR: You need to use -150 grams of meat first.=
and I can't start to cook
Moderators: Public Relations Department, Players Department, Programming Department
marol wrote:Sky, it seems simple for single user system. But in paralel systems two players can simultaneously use meat on project. So imagine such situation:
1. Player A - script checks if there's room for meat in project - yes, there is - continue.
2. Player B - script checks if there's room for meat in project - yes, there is - continue.
3. Player A - script adds 150 meat to the project.
4. Player B - scrpit adds 150 meat to the project.
See more of this probem here: Wiki - Critial Section.
Users browsing this forum: No registered users and 1 guest