Well long time no post here heh, been here since 2002 yikes
anyways... back on subject... I have this alias :
alias calclvl {
var %i = 0, %b = 1, %a = $lines(Levels\ $+ % [ $+ [ $1 ] ])
while (%i <= %a) {
.set %TMP_LVL $calc($read(Levels\ $+ % [ $+ [ $1 ] ], %i) + $read(Levels\ $+ % [ $+ [ $1 ] ], %b))
inc %i
inc %b
}
}
Now whats it doing is $1 = a name like Bob or what not it reads C:\Levels\Bob and within bob it has:
-
10
10
-
So a total of two lines right what i want it to do is read all the lines in what ever i tell it to read like bob or mike or josh etc something to do with the filename is what $1 is but its set as a %... now all i want it to do is add 10 and 10 together and make %TMP_LVL equal to 20 ... and lets say it had 10 on each line for 3 lines i want it to add all three lines and make %TMP_LVL equal to 30 and so on... But what im getting so far is that its setting %TMP_LVL to 0 which i do know why but i can resolve any help would be nice
)