SRL Archive - OSR Help

Need help quick please!


Runescape Pro

2011-02-18 06:13:34

Function FourNumToTBox(VarName: String; TehCoords: Array [0..3] of Integer): String;
Begin
Result:=Writeln(VarName+'.X1:='+IntToStr(TehCoords[0])+';'+VarName+'.Y1:='+IntToStr(TehCoords[1])+';'+VarName+'.X2:='+IntToStr(TehCoords[2])+';'+VarName+'.Y2:='+IntToStr(TehCoords[3])+';');
End;

Whats wrong with it? I get type mismatch at the end of the long line.

**BANNED The Man

2011-02-18 06:38:22

procedure FourNumToTBox(VarName: String; TehCoords: Array [0..3] of Integer);
Begin
Writeln(VarName+'.X1='+IntToStr(TehCoords[0])+';'+VarName+'.Y1='+IntToStr(TehCoords[1])+';'+VarName+'.X2='+IntToStr(TehCoords[2])+';'+VarName+'.Y2='+IntToStr(TehCoords[3]));
End;

Runescape Pro

2011-02-19 00:08:56

What did you change?

kingarabian

2011-02-19 00:27:54

I think he took out Result.

Runescape Pro

2011-02-19 03:31:00

That is what he did! Thank you.

**BANNED The Man

2011-02-19 03:54:54

Sorry, didn't see this was posted in, yes the result was causing a Type Mismatch, I made your function a procedure and respectively took out Result.

-Boom