"nimos100, and others, how many parameters do you typically use in your functions?"
It varies a bit but normally not more than around 5-9, but are working on a game that are quite complex. And the items in it can have quite a few settings and different ones depending on which item it is. And therefore i original decided to just add all settings into a single item object. However due to the functions not being able to handle them all, i had to redesign the way it worked. This is not a huge problem, but was just the way i found out about the bug. So even though its not that big a deal, i thought i would just make them aware, so they could fix it if they feel like it.
The renaming part of parameters i suggested because when you check parameters you might have several "Function.parametre(0,1,2,3,4,5,6) = 1 or 24 or whatever) But these doesnt tell exactly what ir is. And it would just be handy if it instead was "Function.Is_weapon(0) = 1" and so on. I do use globals in some cases especially if i use text for testing, as its easier to avoid mistypes that way. But having a lot of global variables can also be a bit annoying as the list when you need to use one can be quite long.