Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I really need some help i am desperate for a solution!

I have a offline messenging form/unit.

It will not allow me to compile

The FULL Code is here: http://beyluxe.googlecode.com/svn/trunk/mine/OfflinesUnit.dcu[^]

I get the following errors:

Build
  [Error] OfflinesUnit.pas(103): Undeclared identifier: 'LoadString'
  [Error] OfflinesUnit.pas(142): Undeclared identifier: 'LoadString'
  [Fatal Error] MainUnit.pas(480): Could not compile used unit 'OfflinesUnit.pas'


Error 1:

procedure TOfflinesForm.FormShow(Sender: TObject); var   i: Integer;   PMText: string; begin   for i := 0 to OfflineList.Count - 1 do   begin     OfflineListView.Items.Add;     OfflineListView.Items.Caption := OfflineSenders.Strings;     OfflineListView.Items.SubItems.Add(OfflineList.Strings);      Viewer.LoadString(PChar(OfflineList.Objects),'',HTMLType);     Viewer.SelectAll;     PMText := Viewer.SelText;     Viewer.SelLength := 0;     Viewer.Clear;     OfflineListView.Items.SubItems.Add(PMText);   end; end;



Error 2:

procedure TOfflinesForm.SendTextToViewer(User, Text: string;   UserColor: TColor); var   Str: string; begin   Str := '<font size=0 color=#'+IntToHeWebColor(BUDDYNICKCOLOR),8)+'>'+User+':</font> ';   Str := Str + ReplaceSmilesText(' '+Text); //  Str := CorrectHTMLLinks(Str);   Viewer.LoadString(Str,'',HTMLType);   Viewer.VScrollBarPosition := Viewer.VScrollBar.Max;   Viewer.Invalidate; end;



Sorry if it looks weird, im not used to using code tags here! I'm New!

What I have tried:

I haven't tried an awful lot as i don't have the knowledge to do much!

I have no idea how to fix this.
Posted
Updated 8-Apr-16 13:54pm
v4
Comments
Sergey Alexandrovich Kryukov 8-Apr-16 9:13am    
Why using the section "What I have tried" without showing what you have tried? Why discussing any code (and error messages) without showing that code. How anyone could help?

Possible solution: define LoadString above the code trying to use this identifier.

"I'n New!" is not an excuse. Being new does not mean not having some brain to use. It would be fine if you don't understand something in programming, but not even trying to enter simple HTML text properly... Please use "Improve question", format code properly and add relevant information on the problem.

—SA
Member 12444738 8-Apr-16 18:18pm    
Hello,

Sorry I'm really new with delphi!

The FULL Code is here: http://beyluxe.googlecode.com/svn/trunk/mine/OfflinesUnit.dcu
Sergey Alexandrovich Kryukov 8-Apr-16 22:00pm    
Hm... DCU is not human-readable text.
I already told you what to do.

This is not called "beginner". A beginner is one who begins. You are no trying to begin yet. You did not read what DCU is. You did not even try to examine an example of DCU. You did not read or did not understand that you have to declare and or define each identifier. Probably this is because you are trying to write something prematurely, before starting to understand what you are doing.

If means, postpone your project. Take a manual and learn programming, trying to do the simplest exercises at first, those you can easily solve. Focus on learning, not on any "application" goals.

—SA

Quote:
I haven't tried an awful lot as i don't have the knowledge to do much!
There is not much to try, read the error message.
[Error] OfflinesUnit.pas(103): Undeclared identifier: 'LoadString'
[Error] OfflinesUnit.pas(142): Undeclared identifier: 'LoadString'

It tells you that LoadString do not exist, is unknown. Should not be a problem to check if what exist in a THTMLViewer object, even for a beginner. If you writed the code, it should not be complicated to understand what is wrong.

The compiler tells you what is wrong and where. Taking advantage of error messages is also a skill.
By the way the source code is in http://beyluxe.googlecode.com/svn/trunk/mine/OfflinesUnit.pas[^]
 
Share this answer
 
@ppolymorphe could you help me via skype ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900