Tree_to_Cut_Logs is a String, you shouldn't use IntToStr when it's already a string.
Edit: Tree_to_Cut_Logs actually isn't defined.
Tree_to_Cut_Logs is a String, you shouldn't use IntToStr when it's already a string.
Edit: Tree_to_Cut_Logs actually isn't defined.
Last edited by Rick; 11-05-2011 at 11:47 PM.
Scripts: AIOCurser !, Tea Stall Thiever !, Flax Picker !
Other: Objective Functions, Scarduku
Tutorials: How to create a plugin for Simba, [VB.NET] Using My.Settings, [Photoshop] Basic Abstract Art
Outdated: m!ne v1.00 [STATS]
fixed:
Simba Code:program puttingtogetherbasics;
var
Logs:Integer;
Logs2:Integer;
Exp:Extended;
Timer:Extended;
const
Number_Of_Logs=500;
Tree_To_Cut='Magic';
Tree_To_Cut2='Yews';
procedure HowManyLogs;
begin
Logs:=250;
Logs2:=194;
Exp:=195.5;
Timer:=200.75;
Writeln('We are waiting'+FloatToStr(Timer)+'Seconds to continue'); //bart: Float to string, cause Timer is an extended. If you're not sure use ToStr(x)
Writeln('We currently have'+IntToStr(Logs)+'chopped');
Wait(500);
Writeln('We would like to obtain '+IntToStr(Number_Of_Logs)+' before we are done'); //Bart: fixed a ' symbol
Writeln('We are chopping' + Tree_To_Cut + ' trees!'); //Bart: fixed a ' symbol, and Tree_To_Cut is already a string, no need for conversion
// Writeln('When we are done, we will chop'+ IntToStr (Tree_to_Cut_Logs) +'trees'); Bart: No idea what you wanted here.
Writeln('We have gained'+ FloatToStr(Logs*Exp)+ ' cutting Magics'); //Bart: Removed a ( and )
Writeln('We have gained'+ FloatToStr(Logs2*Exp)+' cutting Yews'); //Bart: Removed a ( and )
end;
function WeAreBored:String;
var
s:String;
begin
result := 'What are we going to do now?'; //Bart: results doesn't exist, it is result
s:='We are bored, we are going to chop now'; //Bart: You said String := this should be s :=
wait(500);
writeln(s);
writeln('We are bored, we are going to chop now'); ///Without a string this would be implemented this way. Example of string implemenation is on line 34.
end;
begin //Bart: added begin
Cleardebug;
HowManyLogs;
Writeln(WeAreBored);
end.
Working on: Tithe Farmer
I will be using the standards for now on, tabs seem to organize the project alot more. BTW FINISHED!
Code:program puttingtogetherbasics; var Logs:Integer; Logs2:Integer; Exp:Extended; Timer:Extended; const Number_Of_Logs=500; Tree_To_Cut='Magic'; Tree_To_Cut_2='Yew'; procedure HowManyLogs; begin Logs:=250; Logs2:=194; Exp:=195.5; Timer:=200.00; Writeln('We are waiting '+FloatToStr(Timer/100)+' Seconds to continue'); Writeln('We currently have '+IntToStr(Logs)+' chopped'); Wait(500); Writeln('We would like to obtain '+IntToStr(Number_Of_Logs)+' before we are done'); Writeln('We are chopping '+(Tree_To_Cut)+' trees!'); Writeln('When we are done chopping magics, we are going to chop '+(Tree_To_Cut_2)+' trees!'); Writeln('We have gained ' + FloatToStr(Logs*Exp) + ' cutting magics!'); Writeln('We have gained ' +FloatToStr(Logs2*Exp)+' cutting Yews!'); end; function WeAreBored:String; var s:String; begin result:='Done chopping yews'; s:='We are bored, we are going to chop now'; wait(500); writeln(s); writeln('Chopping yews...'); ///Without a string this would be implemented this way. Example of string implemenation is on line 34. end; begin Cleardebug; HowManyLogs; Writeln(WeAreBored); end.
Don't use tabs, they don't come out good. I suggest reading http://www.kaitnieks.com/scar/scriptingsta/ .. it's a bit outdated but all the basic stuff still applies. Much easier to read.
Send SMS messages using Simba
Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!
There are currently 1 users browsing this thread. (0 members and 1 guests)