I'm trying to use $calc to calculate some numbers and save the result to a file. When this text is said..

Quote:

[CASH SEND] [lincoln_ls(7)] Has Sent $500 To [benminiman0999(4)]


I want it to store the '500' (excluding the '$' char) in a file, and when it is said again, add the existing '500' from the file to the '500' that was just said, and store the result (1000).

This is the script I'm trying to use. I spent hours messing around with it trying to use it differently, but I can't seem to get it working:
http://www.paste.mircscripting.info/index.php?id=2939

So basically this is how it should be:
Quote:

[CASH SEND] [lincoln_ls(7)] Has Sent $500 To [benminiman0999(4)]

(write '500' to a file here)

and then when this is said again...
Quote:

[CASH SEND] [lincoln_ls(7)] Has Sent $500 To [benminiman0999(4)]

(take the previous '500' that was stored in the file and add it to the new '500', resulting in '1000', and replace everything in the file with the result (1000))