Lama
2013-03-02 01:08:59
==SOLVED==
Hi, I have been modifying a buggy script, and decided to add a proggy. To do this, I looked at proggy code of another script, and applied logic.
However, I have run into an un-forseen snag and seek guidance.
Here's declaring proggy variables:
Now I do mention that I don't know all the Simba variable types, but 'Double' doesn't seem to give errors. (I'm more versed in Java)
Heres the entire proggy procedure that I made:
I tested with commenting out the 2nd and 3rd proggy lines (the ones with variables in them), script compiles and runs fines, and it prints out fine when I tell it to, but it obviously lacks the information.
And other than this error, everything runs fine (with my fixes and enhancements) with the commented out proggy ^ lines ^, or without a proggy at all.
As you can see, there is a type mismatch compiling error, but I swear that all variables are similarly declared, and have been IntToStr'inged (as is visible).
What do?
Hi, I have been modifying a buggy script, and decided to add a proggy. To do this, I looked at proggy code of another script, and applied logic.
However, I have run into an un-forseen snag and seek guidance.
Here's declaring proggy variables:
var // proggy variables
TimeGone, lapXP, laps, XPPerhour, TotalXP, LapsPerhour:Double; Now I do mention that I don't know all the Simba variable types, but 'Double' doesn't seem to give errors. (I'm more versed in Java)
Heres the entire proggy procedure that I made:
procedure proggy;
begin
lapXP := 87.5;
ClearDebug;
TimeGone:=(GetTimeRunning/1000);
XPPerhour :=(3600.0 * (laps * lapXP));
TotalXP := lapXP * laps;
LapsPerhour :=(3600*(laps))/((TimeGone));
begin
Writeln('|------------------------ Proggy for the player: ' + P07_PlayerName + '-------------------------|');
Writeln('| You have gone: ' + IntToStr(laps) + ' laps. Thats ' + IntToStr(LapsPerhour) + ' laps per hour! |');
Writeln('| Overall, you have gained: ' + IntToStr(TotalXP) + ' xp. Thats ' + IntToStr(XPPerhour) + ' xp/h! |');
Writeln('|------------------------------------------------------------------------------|');
end;
end; [Error] C:\Users\@#$%@\Downloads\Script_Iam_Fixing .simba(151:116): Type mismatch at line 150
Compiling failed.I tested with commenting out the 2nd and 3rd proggy lines (the ones with variables in them), script compiles and runs fines, and it prints out fine when I tell it to, but it obviously lacks the information.
And other than this error, everything runs fine (with my fixes and enhancements) with the commented out proggy ^ lines ^, or without a proggy at all.
As you can see, there is a type mismatch compiling error, but I swear that all variables are similarly declared, and have been IntToStr'inged (as is visible).
What do?