ID:1703058
 
Keywords: and, datums, new, variables, vars
(See the best response by Kaiochao.)
Code:
Attribute
var capped
var current
var maximum
New(C,M)
C = current
M = maximum

mob/var/Attribute
wisdom
agility
vitality
strength
intellect

stat_points
ability_points

mob/New()
..()
wisdom = new(C = 1 , M = 1)
agility = new(C = 1 , M = 1)
vitality = new(C = 1 , M = 1)
strength = new(C = 1 , M = 1)
intellect = new(C = 1 , M = 1)
stat_points = new(C = 0 , M = 0)
ability_points = new(C = 0 , M = 0)

mob/player
Stat()
statpanel("Vitals")
if(statpanel("Vitals"))
stat("Strength:",strength.current)
stat("Intellect:",intellect.current)
stat("Agility:",agility.current)
stat("Vitality:",vitality.current)
stat("Wisdom:",wisdom.current)


Problem description: My problem is, how do I initialize those variables and make them usable? The values that are set for each variable with the new() proc, do not appear under 'statpanel("Vitals").' Note, I even tried it with 'new(1,1)' instead of 'new(C = 1, M = 1).'

-Regards
Best response
You set them backwards in Attribute.New(), you silly.
C = current
M = maximum

// should be
current = C
maximum = M
.......Omg you can't be serious?! It kept me up for hours. I can't believe I overlooked such an obvious error. Thanks a lot man!