[RELEASE] BadgerStockMarket (uses the real Stock Market)

When I use the /stocks command, the phone does open, but when pressing the home button on it, it spits out these erors
[ 95562] [ GTAProcess] CrBrowserMain/ A cookie associated with a cross-site resource at http://cnn.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032. (@game/ui/root.html:0)
[ 95750] [ GTAProcess] CrBrowserMain/ A cookie associated with a cross-site resource at http://markets.money.cnn.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032. (@game/ui/root.html:0)

The phone then also dissapears and my mouse is stuck in the phone UI screen, Forcing people to relog to fix their game

I canā€™t fix that. Thatā€™s a browser error.

So itā€™s just a issue I have with my chrome or?

Thatā€™s what I would suspect. Honestly not sure where the JavaScript code runs, but I assume it runs on the client, so probably on your client-side browser or something too

This may be your solution though:

Nice Release :hushed:

Thank you!

@DocWeird has converted this script to also utilize old vRP and has also restyled it a bit in his version. Iā€™ll link his here as well. Thanks dude!

2 Likes

You should make a version that works with a gcphone app.

1 Like

When i open the menu i get this error
BadgerStockmarket/server.lua; 65; attempt to call a nil value (global ā€˜GetStockPurchaseDataā€™)

Not sure whats going on with this, but fresh install, after being afk on server all nightā€¦ and after you are in the server for more than 15-20 minutes, get 50MiB+ warning.

wtf

Itā€™s probably because of the client.lua:

Citizen.CreateThread(function ()
	while ESX == nil do
		TriggerEvent('tac:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

ESX is never used in the client.lua, but I forgot to get rid f this piece of codeā€¦ Considering most servers use esx instead of tac for their ESX events, thatā€™s probably the problem. Just remove that bit of code and you should be good! Sorry about that

Awesome, Iā€™ll try it. Thanks!

Did you integrate the SQL into your server?

where you able to solve the issue, iā€™m running into the same problem and i canā€™t quite figure it out

No, I have just disabled the script untill someone figures out a fix, Iā€™ve broken my head over this and Iā€™m done with it lmfao

The stockmarket is taking a lot of RAM from players, any fixes?

1 Like

How many stocks do you have?

Just the standard from the script. No edits.

Can you post the memory problems? I havenā€™t had any