Why do you need this exacly ?
But to answer your question... if you want to know which cvar is higher:
Code:
new highestCvar = 0
if(cvar1 > cvar2 && cvar1 > cvar3)
highestCvar = 1
else if(cvar2 > cvar1 && cvar2 > cvar3)
highestCvar = 2
else if(cvar3 > cvar2 && cvar3 > cvar1)
highestCvar = 3
... but I think there's a better way for it.
Or if you just want the highest value of the three cvars:
Code:
new highestValue = max(max(cvar1, cvar2), cvar3)
Quote:
Originally Posted by OvidiuS
higher than what?
|
Higher than themselves I guess, he's making a bad code example.
__________________