I have an array, visually would look like this:
Code:
Slot 1: STEAM_ID_LAN|PLAYER: Hello World 1
Slot 2: STEAM_ID_LAN|PLAYER: Hello World 2
Slot 3: STEAM_ID_LAN|PLAYER: Hello World 3
Code:
// Delete our previous one
for(new Count;Count < Size;Count++)
{
ArrayGetString(g_NewspaperArray,Count,Message,255);
strtok(Message,ArrayAuthID,35,Temp,1,'|');
trim(ArrayAuthID);
remove_quotes(ArrayAuthID);
if(equali(AuthID,ArrayAuthID))
{
if(++Num >= MAX_ADS)
{
server_print("we reached our max");
ArrayDeleteItem(g_NewspaperArray,Count);
break
}
}
}
This will delete the
latest entry in the array. (When it reaches it's max, three.) This will delete: STEAM_ID_LAN|PLAYER: Hello World 3 - I want it to delete: STEAM_ID_LAN|PLAYER: Hello World 1. How would I go about doing this?
EDIT:
I apparently can't think - id just snip the thread, but my fix obvious is to use "ArrayDeleteItem(g_NewspaperArray,Count - MAX_ADS)"
__________________