bink830
2010-05-22 02:46:09
Ok, so I'm trying to make a smither for my first script but I've come across an early snag in my PostProggie procedure. Excerpt Included Below \/.
I know I have that done in a weird way, but I've been looking and trying everything I could think of to make it work and I'm still getting nothing. If possible I'd like to be pointed in the right direction and not have the script corrected for me so I can learn better. If not, then I'll take whatever help I can get. Thanks.
~Bink
var
TotalTime, TotalBars, TotalLoads, Profit, NegProfit:integer;
procedure PostProggie;
begin
ClearDebug;
TotalTime := 200; //test number in seconds
TotalBars := 28; //test numbers
TotalLoads := 1; //test numbers
Profit := -100; //this is the issue
NegProfit := (abs(Profit)); //[Error] (21125:27): Type mismatch in script.. Aren't they both integers?
WriteLn('Thank you for using My Goldsmither!');
WriteLn('The script ran for '+inttostr(TotalTime/60)+' minutes.');
WriteLn('You smelted '+inttostr(TotalBars)+' in '+inttostr(TotalLoads)+' loads.');
if (Profit > 0) then WriteLn('You made '+inttostr(Profit)+' gold. :)');
else WriteLn('You lost'+inttostr(NegProfit)+' gold. :(');
end;I know I have that done in a weird way, but I've been looking and trying everything I could think of to make it work and I'm still getting nothing. If possible I'd like to be pointed in the right direction and not have the script corrected for me so I can learn better. If not, then I'll take whatever help I can get. Thanks.
~Bink