To Solve: The bank doors are locked. The banker is inside.
Day 10 (late start)
11pm: So have the references all set up (see other notes).
12am: I’m now configuring Lua and VS Code to work on my system.
1 am to 4 am distracted by documentation for redm and reading about lua.
4 am to 6 am making pumpking pie and cheese cake, it is Thanksgiving afterall. 2021
5:30 am pumpkin pie is in the oven. bake potates are cooling, later to be mashed potatoes. cheese cake is on the stove, the cream cheese is too cold to blend/mix correctly. To be continued after the pie comes out.
Pies are out and cooling, cookies are done. I’m reading documentation. Trying to sort out if Lua is working and installed correctly locally, by testing other folks code and seeing if it works. So far it’s a no. I might just be too tired after 12 hours of coding, reading code, and baking. I’ll come back to this after a nap, and some Thanksgiving dinner. Later.
Blue’s copy of the server resolved several nonUI issues. The UI for the bank persisted. I tracked it down to these three issues. The first issue was not throwing errors on the previous server files, but on the new files this error was being logged.
[ 9730796] [b1436_GTAProce] CrBrowserMain/ Mixed Content: The page at 'https://cfx-nui-vorp_bank/ui/hud.html' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://vorp_banks/Withdraw'. This request has been blocked; the content must be served over HTTPS. (https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js:2)
This error means just what it says. All connections back to the server should use “https”. Any code like below should be changed.
The new entry should be.
The next issue was that it wasn’t excuting the code. When I started the project none of the formating for this module matched the standards listed in the cfx documentation for making modules. I reformated the module to match their instructions, and renamed it when I put the updates files on my local server. I failed to update the hud.html file to reflect the change in the name. The error above lists “vorp_banks” (plural) but the directory on my local server is “vorp_bank” (singular).
Side note: The code does not appear to update the hud.html to reflect the bank the player is standing in. That should be updated. (Added to Dragon’s Hollow project list.)
Side note: Code running is my compiled version not the binaries downloaded from git. I can make changes to this module and compile it. It was a good reminder on how to use visual studio, c# and learning about lua and how the two work with json.
Side note: The code does not check to verify the transaction occured succesfully. It just assumes completion. Create a function to verify the update completed successfully. (Added to Dragon’s Hollow project list.)
Side note: Future items will be added there, though I will continue the coding blog here. The other site will be for posting releases, and “story” news from inside the server, like a newspaper would.
— Update —-
We are building the doors locking and unlocking on server start into the ipl scripts for each building. This will not interfer with other scripts that may control the doors after start. As we get a rough draft for each building written we will upload them to the tebex store.