TList cannot be invoked
BlitzMax Forums/BlitzMax Beginners Area/TList cannot be invoked
| ||
If CountList(K_E_HighScoreList) > 10 For Local purge = 11 To CountList(K_E_HighScoreList) Local purgee:THighScore = THighScore(K_E_HighScoreList(purge)) Next End If I'm trying to grab specific types in a list by their indexed number. The error is coming from this line: Local purgee:THighScore = THighScore(K_E_HighScoreList(purge)) Any ideas? |
| ||
yeah problem is that you need .valueatindex(purge) instead of simply purge. But this is a very bad idea with lists as it will have to go step by step through the list even with an index. convert it to array (arrayfromlist) first and do index based operation on an array |
| ||
Thanks Dream! I dont think its a bad idea considering its only done at very specific instances. |
| ||
If your list is not altered after beeing filled or only in rare cases, then converting is a very usefull thing. (if you need to modify it rarely, you can create a list from array again for that task and reconvert to array afterwards) |