Gadget list index out of range?
BlitzPlus Forums/BlitzPlus Beginners Area/Gadget list index out of range?| 
 | ||
| Hi all! :) I decided to try out BlitzPlus, and I seem to get the hang of it pretty well. But I have a small problem. I get:  ERROR: "Gadget list index out of range"  from the below code... Above main loop: Inside main loop: The above code is in the main loop in a case which calls the function kickPlayer() when I hit the "Kick" button. Thank You! | 
| 
 | ||
| Try this if it says anything: index = SelectedGadgetItem(playerlist)
Print index ; Just for debugging. Not sure if ^that returns an index or a handle to that list item....
; Always make sure you're inside range.
If index > -1 And index < CountGadgetItems(playerlist) Then
	
    kickedplayer$=GadgetItemText (playerlist, index)
EndIfI have no idea if the code even works.. Not been using that stuff so much yet. Hope it helped! Cheers. |