Array index (proprocessor) ?
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
Why? If you need static access to it, put it in a separate variable.
I use it for lists that are often changing.
Such as a list of settings.
Or the list of updates on my server. I will add upgrades to the latest updates, but I want to access another line of update
When I add a row to top, all index will +1.
I add very often.

Код:
new ListOfUpdates[][] = {
	/*
	add new update on top
	*/
	"Update 3: Smaller update",
/*
some updates
*/
	"Update 2: Very big and interesting update",
/*
some updates
*/
	"Update 1: Add something"
/*
1000 old updates
*/
};

cmd:updates(playerid,params[])
{
	//show first 10 lines (new updates)
}

cmd:bigupdate(playerid,params[])
{
	//show 10 lines of update 2 (i don't now the index of 'Update 2:...')
}
Reply


Messages In This Thread
Array index (proprocessor) ? - by ATomas - 18.11.2018, 12:42
Re: Array index (proprocessor) ? - by ATomas - 18.11.2018, 13:39
Re: Array index (proprocessor) ? - by ATomas - 18.11.2018, 13:57
Re: Array index (proprocessor) ? - by ATomas - 18.11.2018, 14:31

Forum Jump:


Users browsing this thread: 3 Guest(s)