Discord Moderators Pirulax Posted August 20, 2017 Discord Moderators Share Posted August 20, 2017 So, friend of mine got this error: Picture He was like: dbConnection was in use, this is why it happened, but i was like: thats impossible, so this is why i ask you guys. btw: This is just a question, and i dont need a script-fix for is, just an answer about it.Thx in advance. Link to comment
Moderators IIYAMA Posted August 20, 2017 Moderators Share Posted August 20, 2017 The variable that contains the database connection is nil, as simple as that. If this variable contains a nil value, you should cancel the event onResourceStart so the resource doesn't start. Without database connection / database the script wouldn't be working correctly in most cases. Here is where the script probably failed to connect: https://wiki.multitheftauto.com/wiki/DbConnect Link to comment
Discord Moderators Pirulax Posted August 21, 2017 Author Discord Moderators Share Posted August 21, 2017 No, you misunderstand me, he had a resource called mtd_database, this is where he called dbConnectionm and then, he just exported the getConnection() function,it worked totally fine, but then he got this warning, do you understand me now? Link to comment
Moderators IIYAMA Posted August 21, 2017 Moderators Share Posted August 21, 2017 I didn't misunderstand you, you just did forget half of the information so I couldn't understand you. There are so many ways why this might fail and give the exact same error, at the moment I can only guess. He should try to use the call function instead of exports to insure that the export arguments are successfully transferred. He should learn to debug his code properly, not just waiting for errors and warnings to show up. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now