SkyDow Posted August 16, 2020 Share Posted August 16, 2020 Hi all ! Can anyone help me with a problem please!?! It doesn't work to give / sban / pban / skick! show me the error in debugscript 3 below! how can i solve ?! https://imgur.com/ySzNMpZ ban_s.lua function offlineBanAPlayer(thePlayer, commandName, targetUsername, hours, ...) if exports.integration:isPlayerTrialAdmin(thePlayer) then if not (targetUsername) or not (hours) or not tonumber(hours) or (tonumber(hours)<0) or not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Player Username] [Time in Hours, 0 = Infinite] [Reason]", thePlayer, 255, 194, 14) else hours = tonumber(hours) or 0 if (hours>168) then outputChatBox("You cannot ban for more than 7 days (168 Hours).", thePlayer, 255, 194, 14) return false end mysql/connection.lua Error 101 on starting in if (mysql_ping(forumConnection) == false) then function forumPing() if (mysql_ping(forumConnection) == false) then -- FUU, NO MOAR CONNECTION destroyForumConnection() openForumDatabase(nil) if (mysql_ping(forumConnection) == false) then logForumSQLError() return false end return true end return true end HELP ME POR FAVOR ! Link to comment
Ceeser Posted August 16, 2020 Share Posted August 16, 2020 (edited) It seems like "forumConnection" simply doesn't exist ( "got nil" ). Where and how do you define/create it? (hide data like ip/login/password!) also: Why do you use if (mysql_ping(forumConnection) == false) then twice in the function? Does.. destroyForumConnection() openForumDatabase(nil) establish a new connection between the 2 if's? Edited August 16, 2020 by Ceeser 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