View Single Post
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-28-2015 , 11:05   Re: [HOW TO] Retrieve random values from an array without retreiving the same twice
Reply With Quote #67

Quote:
Originally Posted by Arkshine View Post
Without forcing PRI, returned value are correct, or am I missing something?
Maybe the adding of that #emit directive was too confusing, sorry about that. I did it only just to prove this:
Quote:
So, when you return an incremented value, whatever was left in PRI (which could basically be anything) will get returned.
The value of variable "var" is supposed to get loaded into the PRI register, but the function returns whatever was in PRI, not the variable value.
klippy is offline