Quote Originally Posted by Mitch View Post
Here you call the function 'randombox' on the list and pass the weapon (with the same index as the box) via the first parameter:

PHP Code:
for(i=0;i<randomboxes.size;i++) randomboxes[ithread randombox(randomweaps[i]); 
Your loop ran out of weapons therefore the variable 'weap' is now undefined (no entity) which results in a script runtime error.

You can do one of these options:
  • Make sure both lists are the same size.
  • Check randomweaps's size before calling the 'randombox' function.
if...return fixed this error. thx.
https://i.imgur.com/0a6oNbP.png