Quote from: Crimson Wizard on Tue 03/09/2024 12:00:26But in your case even that is not necessary. As you may see, the start and end indexes have a linear dependency on Tasklist_page value. So the code becomes:Code: ags int start_at = Tasklist_page * 5; int end_at = start_at + 5; for (int i = start_at; i < TaskReceivedCount && i < end_at; i++) { int taskID = TaskReceived[i]; lstTaskList.AddItem(GameTasks[taskID].Name); }
Beautiful! I'll start working on the proper version now, hopefully won't run into nasty problems anymore.
I'll add you in the game credits for sure!