Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


UCE 6.7 Compiling Error - Help Please

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source
View previous topic :: View next topic  
Author Message
MorbidEden
How do I cheat?
Reputation: 0

Joined: 13 Apr 2018
Posts: 3

PostPosted: Sat Apr 14, 2018 5:23 am    Post subject: UCE 6.7 Compiling Error - Help Please Reply with quote

I'm trying to make a personal UCE from CE 6.7 Source and when attempting to compile I've come across something that I have no idea how to fix. I'm a bit of a programming newb, but I'm trying to learn as I go.

Lazarus 1.6.4
FPC 3.0.2

Code:
procedure SaveCEM(Filename:string;address:ptrUint; size:dword);
var memfile: TFilestream;
    buf: pointer;
    temp:ptruint;
    a: qword;
begin
  memfile:=Tfilestream.Create(filename,fmCreate);
  buf:=nil;
  try
    getmem(buf,size);
    if readprocessmemory(processhandle,pointer(address),buf,size,temp) then
    begin
      memfile.WriteBuffer(pchar('XXXXXX')^,11);
      temp:=2; //version
      memfile.WriteBuffer(temp,4);
      a:=address;
      memfile.WriteBuffer(a,8);
      memfile.WriteBuffer(buf^,size);
    end else messagedlg(Format(rsTheRegionAtWasPartiallyOrCompletlyUnreadable, [IntToHex(address, 8)]), mterror, [mbok], 0);
  finally
    freeandnil(memfile);
    freemem(buf);
    buf:=nil;
  end;
end;


Code is from OpenSave.pas and the error I am getting is "Error: Typecast has different size (6 -> 8) in assignment" which directs to this line (specifically between the "p" and "c" in "pchar") "memfile.WriteBuffer(pchar('XXXXXX')^,11);"

Any help would be greatly appreciated.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 351

Joined: 09 May 2003
Posts: 20408
Location: The netherlands

PostPosted: Sat Apr 14, 2018 12:28 pm    Post subject: Reply with quote

undo all your edits until ce compiles and then go from there

most likely you blindly replaced everything eith cheatengine to xxxxxx which will not work

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
MorbidEden
How do I cheat?
Reputation: 0

Joined: 13 Apr 2018
Posts: 3

PostPosted: Sat Apr 14, 2018 1:13 pm    Post subject: Reply with quote

Thank you. I will do that.

I was using a tutorial for an older version and it had steps for CEHook and Stealth. I assume those are obsolete since the files aren't in the source. Is that correct?

Also, is there no need in CE 6.7 to create a dbk64.dll file? I couldn't find the corresponding Lazarus file in the source.

Thank you so much for your help.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 351

Joined: 09 May 2003
Posts: 20408
Location: The netherlands

PostPosted: Sat Apr 14, 2018 5:24 pm    Post subject: Reply with quote

the tutorial you're following is extremely old yes, probably 10 years or so that there was a dbk dll
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
MorbidEden
How do I cheat?
Reputation: 0

Joined: 13 Apr 2018
Posts: 3

PostPosted: Sat Apr 14, 2018 6:26 pm    Post subject: Reply with quote

Yeah, it's pretty old, but most of the steps are still good. I couldn't find a better tutorial that allowed me to do everything manually. I think I did accidentally replace cheatengine entries with my cover up name like you said.

Thank you again for your help. I appreciate it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Source All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites