Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when attempting to purchase apartment #17

Open
TommyGlock opened this issue Jun 21, 2021 · 1 comment
Open

Error when attempting to purchase apartment #17

TommyGlock opened this issue Jun 21, 2021 · 1 comment

Comments

@TommyGlock
Copy link

TommyGlock commented Jun 21, 2021

Menu comes up to purchase.
When I select "Buy Apartment", it takes the money from me (cash), but nothing else happens in game.

I get the following messages in the console:
[ script:Apartments] SCRIPT ERROR: @Apartments/apart_server.lua:61: attempt to call a nil value (method 'executeQuery')
[ script:Apartments] > handler (@essentialmode/server/player/login.lua:132)
[ script:Apartments] > handler (@Apartments/apart_server.lua:39)
[ script:Apartments] SCRIPT ERROR: @Apartments/apart_server.lua:276: attempt to call a nil value (method 'executeQuery')
[ script:Apartments] > handler (@essentialmode/server/player/login.lua:132)
[ script:Apartments] > handler (@Apartments/apart_server.lua:267)
[ script:Apartments] SCRIPT ERROR: @Apartments/apart_server.lua:61: attempt to call a nil value (method 'executeQuery')
[ script:Apartments] > handler (@essentialmode/server/player/login.lua:132)
[ script:Apartments] > handler (@Apartments/apart_server.lua:39)

I have imported the "user_apartment" SQL in a few times.

Both prerequisites are present and running

@TommyGlock
Copy link
Author

These are the lines of code that are creating the errors.

Apartments/apart_server.lua:61
local executed_query = MySQL:executeQuery("SELECT * FROM user_apartment WHERE name = @nom", {['@nom'] = tostring(name)})

Apartments/apart_server.lua:276
local executed_query2 = MySQL:executeQuery("INSERT INTO user_apartment (identifier, name, price) VALUES (@username, @name, @price)", {['@username'] = player, ['@name'] = name, ['@price'] = price})

At no time do I see any data showing in "user_apartment" in the database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant