Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 22:28:47 +0000



Post From: Unable to delete all s_UseTool items

[2023-10-19 13:34:10]
User907968 - Posts: 823
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.