Login Page - Create Account

Support Board


Date/Time: Sat, 12 Jul 2025 13:03:08 +0000



Post From: Unable to delete all s_UseTool items

[2023-10-19 13:34:10]
User907968 - Posts: 842
What am I missing? Is this a bug?
Yes, it is a bug in your code.


while (sc.GetUserDrawnChartDrawing(sc.ChartNumber, DRAWING_UNKNOWN, j, i)) {
sc.DeleteUserDrawnACSDrawing(sc.ChartNumber, j.LineNumber);
i++;
}

You are deleting an item from the index, but still incrementing, therefore every other drawing is skipped over.
The increment is not needed if the call to delete is successful.