• MySQLOOv8 doesnt connect to database - no errors at all
    4 replies, posted
Hello FP community, I tried to do something with mysqloo(using v8) but it doesnt connect to the database at all, it doesnt even print anything, not even the print at the top of the function which gets ran on boot [code] require("mysqloo") -------------------------------------------------- -- Database stuffs -------------------------------------------------- local db = mysqloo.connect("NOPE NO INFO HERE") function connecttodb() print("[PLTCE] - Connecting to database.") -- DOESNT PRINT EITHER function db:onConnected() print("[PLTCE] - Connected to database.") end function db:onConnectionFailed(db, err) print("[PLTCE] - Failed to connect to database, error: "..err) end db:connect() end connecttodb() [/code] I wanted it to automaticly connect on boot of the server like ULX GB does(even though MySQLOO says it cant without the think hook??) Please, help me!
This code printed fine twice for me. Are you sure this code is actually being ran?
[QUOTE=AK to Spray;49238569]This code printed fine twice for me. Are you sure this code is actually being ran?[/QUOTE] even if I put it inside "addons/myaddon/lua/autorun/server" it wont work.
I put the exact same code in (disregarding database information) and it works fine. Is that the entirety of your script or do you have more inside? If there is more, post it all.
[QUOTE=AK to Spray;49238667]I put the exact same code in (disregarding database information) and it works fine. Is that the entirety of your script or do you have more inside? If not, post all of the code in the script.[/QUOTE] I even deleted the whole addon, made a new one with the same folder structure given above, called the file "init.lua" and pasted exactly that code inside, even at the top print("test"), rebooted the server and nothing happened.
Sorry, you need to Log In to post a reply to this thread.