Jump to content

[HELP]


yukitokun1996

Recommended Posts

Posted

ERROR: [system]\item-system\s_item_system.lua:27: attempt to index local 'text' (a number value)

this is my code :
 

function removeOOC(text)
	if not text then
		outputChatBox("Error Code 001")
		return ""
	end
	return text:gsub("%s*%(%(([^)]+)%)%)%s*","") -- removes the (( )) part
end

 

Posted

You're passing text as a number somewhere, When you need to pass a string, Althought if you do want to be able to pass numbers use tostring to convert them to strings and be able to use gsub.

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