Page 1 of 1

[ SOLVED ] Having a problem with putting a function into a list

Posted: Fri May 24, 2024 8:19 pm
by imDread

Code: Select all

function Exit()
		love.event.quit()
	end
	F1 = Exit
	-- Ui Dementions
	
	
	
	UiHeight = 15
	textOpacity = 0.1
	textsClr = {{0.2,0.2,0.2}}
	textsFunctions {F1}
-**Btw this code is written in love.load()**-

im trying to put that function in a list but every time i do that it gives me this error :

main.lua:120: attempt to call global 'textsFunctions' (a nil value)

Pls guys help :(

Re: Having a problem with putting a function into a list

Posted: Fri May 24, 2024 9:17 pm
by keharriso
I think you're missing an equals sign.

You want

Code: Select all

textsFunctions = {F1}

Re: Having a problem with putting a function into a list

Posted: Sat May 25, 2024 8:10 am
by imDread
Oh, thanks