g_hMenuDataPack[iClient].Reset(false); // or true to clear data
DataPack g_hMenuDataPack[MAXPLAYERS + 1]; func1(int iClient) { if(g_hMenuDataPack[iClient] != null) { delete g_hMenuDataPack[iClient]; g_hMenuDataPack[iClient] = null; } g_hMenuDataPack[iClient] = new DataPack(); g_hMenuDataPack[iClient].WriteString(strPerk); g_hMenuDataPack[iClient].WriteCell(iPrice); g_hMenuDataPack[iClient].WriteCell(iDuration); } func2(int iClient) { g_hMenuDataPack[iClient].Reset(); // This is where I get the "invalid datapack handle" error. }