I have added suitable blocks so that the app displays ten buildings and the number of computers available in each one. There are two buttons that allow the user to either reserve computers or cancel their reservations. However, if all the computers have been reserved in a building, a message is displayed to the user informing them that there are number of computers. What I need help with is how to display the buildings with computers available to book. Any help would be appreciated, and thank you in advance.
P.S. If you need to have a look at my code to get the gist of what I have done, please private message me.
x Turn on thread page Beta
Computer Science: App Inventor 2 help... watch
- Thread Starter
- 24-02-2016 10:08
- 25-02-2016 00:11
Well i think using a database is much easier and iirc allows you to move the reservations across different pages. As for you the displaying the number of computers - Use a simple text box combined with a random integer between two given numbers so the app just randomly prints the number of pc's available each time - Your better off using a variable here. Now you can use this to starting setting up conditions
If we know the text of a box is 0 then we can setup a condition where the user is redirected back to the map or somewhere else
if its not equal to 0 then allow the user to make a reservation and subtract 1
To cancel there reservations simply the opposite most likely and add one but you need to make sure it does not go over the max value by using one of the logic operators and maths symbolsLast edited by jpmorgz101; 25-02-2016 at 00:12.