P
Pepasone
Guest
I'm passing arguments to a script with this:
I'm then trying to do this with said variables:
It isn't doing anything, but it also isn't throwing any errors. Why would that be?
GML:
script_execute(scr_itemcreation, item_avoid, item_armor, item_resist);
Code:
// Create variation in item stats
if argument_count > 0
{
for (i = 0; i < argument_count; i++)
{
if argument[i] <= 10
{
argument[i] += irandom_range(-2, 2);
}
else if argument[i] <= 30
{
argument[i] += irandom_range(-3, 3);
}
else if argument[i] <= 40
{
argument[i] += irandom_range(-4, 4);
}
else
{
argument[i] = round(argument[i] * (1.1 - random(.2)));
}
}
}