Jump to content

How to fix this errors in my killmessages?


Turbe$Z

Recommended Posts

first error by:

function createKillMessageGUI()

	local gap = config.iconHeight - config.textHeight

	gap = gap/2

	for i=1,config.lines do

		local y = config.startY*screenY + (config.iconHeight*(i-1))

		y = y + gap

		contentMessages[i] = { dxText:create("",0,y) }

	end

	endTime = config.fadeTime + config.startFade

end

--

second error by:

 function destroyLine ( line )

	 for k,part in ipairs(contentMessages[line]) do

		 destroyWidget(part)

	 end

	 contentMessages[line] = {}

 end

first error: killmessages\gui.lua:159: attempt to index global 'dxText' (a nil value)

second error: killmessages\gui.lua:468: bad argument #1 to 'ipairs' (table expected, got nil)

how to fix this? i tried fix, but doesn't working :( 

  • Like 1
Link to comment

For the first error, is killmessages/utils/textlib.lua in the meta.xml? That file contains the dxText library which it appears you do not have. (if you don't have that file, you can get it from here: https://github.com/multitheftauto/mtasa-resources/blob/master/[gameplay]/killmessages/utils/textlib.lua)

The second error is a result of a table not existing (contentMessages[line], where line is the ID of the line to remove, I believe). This could just mean you passed a wrong ID, and the data for that ID does not exist.

Edited by MrTasty
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...