Hi, there.
I am in deep-chaos about getScriptLock() in Lock Service.
What I am trying to build ;
There is a list of fruits ( sheet fruits)
User runs the script to get a fruit ( 2 persons cannot get a same fruit)
My experience ;
2 users ran the script and selected apple at the almost same time and they both won apple.
I suppose I include scriptLock in checkFruitAvailability() so two of them should not have won apple but one of them only..
I greatly appreciate if you could help me on this...
Coding;
main function
functions called by main
sheet fruits
sheet winner