Jump to content

[HELP]BANS


WRIST

Recommended Posts

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

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 by Ceeser
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...