Jump to content

مشكله في مود


sawser

Recommended Posts

السلام عليكم  

الفنكشن 

function issueTicket(thePlayer, theCommand, theVehicle, amount, ...)
	local logged = getElementData(thePlayer, "loggedin")
	if (logged==1) then
		local issuerID = getElementData(thePlayer, "account:character:id")
		local team = getPlayerTeam(thePlayer)
		if (getTeamName(team) == "Los Sa326 Enterprises")(getTeamName(team) == "Los Santos Police Department") or (getTeamName(team) == "San Andreas State Police") then
			if not (theVehicle) or not (amount) or not (tonumber(theVehicle)) or not (tonumber(amount)) or not (...) then
				outputChatBox("SYNTAX: /" ..theCommand.. " [vehID] [amount] [reason]", thePlayer, 255, 194, 14)
			else
				local reason = table.concat( { ... }, " " )
				mysql:query_free("INSERT INTO `pd_tickets` (`reason`, `vehid`, `amount`, `issuer`, `time`) VALUES ('".. mysql:escape_string(reason) .."', "..mysql:escape_string(theVehicle)..", "..mysql:escape_string(amount)..", "..mysql:escape_string(issuerID)..", NOW() - interval 1 hour)")
				outputChatBox(" >>> Ticket successfully issued.", thePlayer, 0, 255, 0)
				local teamMembers = getPlayersInTeam(team)
				local charname = getPlayerName(thePlayer):gsub("_", " ")
				local factionID = getElementData(thePlayer, "faction")
				local factionRank = getElementData(thePlayer, "factionrank")
				local factionRanks = getElementData(team, "ranks")
				local factionRankTitle = factionRanks[factionRank]
				for key, value in ipairs(teamMembers) do
					outputChatBox("" .. factionRankTitle .. " " .. charname .." has issued a vehicle ticket to VIN " ..tonumber(theVehicle).. " with the amount $" ..tonumber(amount).." for the reason: " ..reason.. ".", value, 0, 102, 255)
				end
			end
		end
	end
end
addCommandHandler("ticketveh", issueTicket)

 

المشكله 

[2017-12-05 11:37:03] ERROR: ticket-system/s_vehticket.lua:98: attempt to call a boolean value

 

الحل ؟

Link to comment
2 hours ago, sawser said:

السلام عليكم  

الفنكشن 


function issueTicket(thePlayer, theCommand, theVehicle, amount, ...)
	local logged = getElementData(thePlayer, "loggedin")
	if (logged==1) then
		local issuerID = getElementData(thePlayer, "account:character:id")
		local team = getPlayerTeam(thePlayer)
		if (getTeamName(team) == "Los Sa326 Enterprises")(getTeamName(team) == "Los Santos Police Department") or (getTeamName(team) == "San Andreas State Police") then
			if not (theVehicle) or not (amount) or not (tonumber(theVehicle)) or not (tonumber(amount)) or not (...) then
				outputChatBox("SYNTAX: /" ..theCommand.. " [vehID] [amount] [reason]", thePlayer, 255, 194, 14)
			else
				local reason = table.concat( { ... }, " " )
				mysql:query_free("INSERT INTO `pd_tickets` (`reason`, `vehid`, `amount`, `issuer`, `time`) VALUES ('".. mysql:escape_string(reason) .."', "..mysql:escape_string(theVehicle)..", "..mysql:escape_string(amount)..", "..mysql:escape_string(issuerID)..", NOW() - interval 1 hour)")
				outputChatBox(" >>> Ticket successfully issued.", thePlayer, 0, 255, 0)
				local teamMembers = getPlayersInTeam(team)
				local charname = getPlayerName(thePlayer):gsub("_", " ")
				local factionID = getElementData(thePlayer, "faction")
				local factionRank = getElementData(thePlayer, "factionrank")
				local factionRanks = getElementData(team, "ranks")
				local factionRankTitle = factionRanks[factionRank]
				for key, value in ipairs(teamMembers) do
					outputChatBox("" .. factionRankTitle .. " " .. charname .." has issued a vehicle ticket to VIN " ..tonumber(theVehicle).. " with the amount $" ..tonumber(amount).." for the reason: " ..reason.. ".", value, 0, 102, 255)
				end
			end
		end
	end
end
addCommandHandler("ticketveh", issueTicket)

 

المشكله 


[2017-12-05 11:37:03] ERROR: ticket-system/s_vehticket.lua:98: attempt to call a boolean value

 

الحل ؟

إتمنى توضح إي سطر هو المشكلة ,,

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...