ID:174657
 
From 7 seven far's which are all holding a numberical value, I'm trying to make a proc which would return a text string containing the biggest var. Is there a quick way to do that without having to use many if's?

Thank you for your time.
You can use the min() and max() procs for situations like that.
In response to Foomer
Ah, thank you very much. I never knew of those procs. But now I have a different problem. After equping an "orb" I want to call a proc. The error is :

BattleSystem.dm:471:error:usr.firesoul:undefined var

Here is the coding:

obj/orbs
BurningOrb
verb
Hold()
if(usr.holdingorb)
usr<<"<small>You are already holding an orb"
else
//Stuff here
OrbChanges(usr)

obj/proc/OrbChanges(usr)
var/blahblah = max(usr.firesoul,usr.watersoul,usr.icesoul,usr.thundersoul,usr.airsoul,usr.earthsoul)


The problem I guess is that the "usr" dosn't get transfered to the proc. So the proc dosn't know usr is a mob therefore calling firesoul, watersoul ect an undefine var. How would I fix that?
In response to SSChicken
obj/proc/OrbChanges(mob/M)
try that

<-Airjoe->
In response to Airjoe
Hah, it worked! Thank you airjoe.