Jump to content


Check out our Community Blogs

Sparky

Member Since 23 Sep 2008
Offline Last Active Oct 16 2008 06:53 AM
-----

Topics I've Started

Help! Rlink32 Error

13 October 2008 - 07:31 AM

Hi

Ive got a terrible problem that I hope someone can help me with. When I try run my program I get a //[Error] Rlink32: Unsupported 16bit resource in file {"my fil name.dfm"}. I searched on the web for an answer, but the ones I found were not exactely what I wanted. The only thing I did was change the form and code a little and then the error occured when i tried to run it or to complile it. I thought I my have change a file by accident, so I ran a backup unchanged copy form another computer, which works on that computer, but when I ran it in delphi it ave me the same error.

I am using multiply forms and it complains only about one or two. I tried restarting delphi and my computer, both didn't work and tried my other computer where it gives the same error. When it attempts to open one form it gives me the error // Error creating form: Invalid binery value on line 17997//. I have no idea what that means and when I press OK it complains while opening another for with the error //Error creating form: Invalid binery value on line 2008//. Of coarse I still can view the code and form, and the syntex is even correct.

Could anyone tell me how to solve this problem as I really need to carry on with my program.

Thanks

Saving and reading a Text file

26 September 2008 - 09:16 AM

Hi

Could anyone give me a simple code, codes that I could use to write data to a text file and then read the data. I a more detailed explaination I am creating a program that requires delphi to save information such as high scores "Permanently" so that when the program is closed and opened again the data is still there. I have read a few programs on the web but in my case i want the data on the text file to be from highest to lowest and not randomly added.

I hope this is detailed enough. Please feel free to contact me if you need pacifics. And sorry to anyone who as posted this in an other way before.

I would be of great help if anyone could assists me

Dividing

23 September 2008 - 04:24 AM

Hi im new at this forum.
I've been donig delphi for almost a year now, but i still have problems in my programs as i am not a professional. My latest problem is that i have to created a program that divides two random numbers. The problem is that the answer must be a whole number and not a decimal one. THe second number must also divide exactely in to the first one.
For example: 10 / 5 = 2 and not 10 / 3 = 3.333333
The first number has also got to be greater than the second number.

This is my code and it exicutes it when a button is pressed, it is incomplete, but my main aim is to get the answer as above.
procedure divide;
var iAdd1, iAdd2, iresult : integer;
begin
Randomize;
iAdd1 := Random(20) + 1;
iAdd2 := Random(20) + 1;
iResult := iAdd1 div iAdd2;
end ;

procedure TfrmPrimary.BitBtnDivideClick(Sender: TObject);
var
rAdd1, rAdd2, ireal, rResult : Real;
begin
Randomize;
rAdd1 := Random(20) + 1;
rAdd2 := Random(20) + 1;
rResult := rAdd1 / rAdd2;
if not (rResult In [1..20]) then
divide;
Inputstr := InputBox('Addition [ / ]', IntToStr(iAdd1) +  '/' + IntToStr(iAdd2) + ' - Always put in a Answer','0');
  If StrToInt(Inputstr) = iResult then
  inc(iRight,1) else
  inc(iWrong,1);
    If StrToInt(Inputstr) = iResult then
    lblRightDivide.Caption := 'Number of Correct Answers: ' + IntToStr(iRight)  else
    lblWrongDivide.Caption := 'Number of Incorrect Answers: ' + IntToStr(iWrong);
end;

The code my look a mess, but could anyone please help
Thanks

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download