How do I create a HUD adverter?

Okay so, I’ve been trying to make this text change every 30 seconds, with the text I have in the table, but it’s not working.
It saids I need pairs, or something, and table is a nil value.
But it’s not >:[

Anyways, here.

[lua] tiptable={}

function tipchange()
	for k, v in pairs (tiptable) do
draw.SimpleText(table.Random(v[index]), "CloseCaption_Bold", 0.5 * ScrW(), 0.015 * ScrH(), Color( 0, 0, 0, 255 ),TEXT_ALIGN_CENTER )"

Inside GM:HUDPaint()
[lua] timer.Create(“tipchangerthing”, 30, 0, tipchange)

It aint working -.-"

Well for a random value from that table you would just have table.Random(tiptable). There is no need for a loop here, but even if there was it wouldn’t be like that. You are trying to use table.Random on a table that does not exist in a string from your table tiptable, and on top of that your trying to use a non existent variable (index) to select the table (hope that made sense). Also the timer should not be in the HUDPaint hook, that will cause it to create and start it constantly. You should have the timer outside of the hook and you should have your draw function in it. I would suggest that you just make the function being run by the timer just set a variable and have that variable be the draw functions text. Sorry if that didn’t make sense i’m bad at explaining things. By the way if you haven’t already you should take The pil