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 


A request - And a bug

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Zhoul
Master Cheater
Reputation: 1

Joined: 19 Sep 2005
Posts: 394

PostPosted: Sat Oct 29, 2005 6:35 pm    Post subject: A request - And a bug Reply with quote

Lets start with the bug to get the bad outta the way.

When creating trainers, I've often been 'jacked' by what appears to be a 'list index' bug. When coding in other languages, I've often had similar issues, so I hope 'list index' makes sense Wink

Lets say I have a table of 10 entries.

Entry 1
Entry 2
Entry 3
Entry 4
Entry 5
Entry 6
Entry 7
Entry 8
Entry 9
Entry 10

*Often*, If I delete an entry in the middle of the list...

Entry 1
Entry 2
Entry 3
Entry 4
Entry 6
Entry 7
Entry 8
Entry 9
Entry 10

then create a new, replacement entry...

Entry 1
Entry 2
Entry 3
Entry 4
Entry 6
Entry 7
Entry 8
Entry 9
Entry 10
Entry 11 (Entry to be moved up)

my replacement entry takes the form of the entry above it once moved...

I create the new entry, then , click on the entry itself (hoping to 'set' the list index properly), then click the "move up" button... this is what starts happening...

Entry 1
Entry 2
Entry 3
Entry 4
Entry 6
Entry 7
Entry 8
Entry 9
Entry 9 <---- Was entry 11
Entry 10

*click*

Entry 1
Entry 2
Entry 3
Entry 4
Entry 6
Entry 7
Entry 8
Entry 8 <--- was entry 11
Entry 9
Entry 10

*click*

Entry 1
Entry 2
Entry 3
Entry 4
Entry 6
Entry 7
Entry 7 <---- was entry 11
Entry 8
Entry 9
Entry 10

This continues, until I stop, generate the trainer, then close/open it.. At which point, something even more strange occurs...

Entry 1
Entry 2
Entry 3
Entry 4
Entry 6
Entry 7
Entry 7 <---- where the heck did this come from? a 3rd?
Entry 7 <---- assuming this one was entry 11
Entry 8
Entry 9
Entry 10

The thing I noticed is that there are now 11 entries, 2 duplicates... So surely , this must be some kind of list indexing issue, or an issue with 're-numbering' the remaining entries, after one is removed.

I can repair this, by moving the two duplicate entries to the bottom of the list, and deleting them , from the bottom up, then re-creating my needed entries.

Further: I can stop this from happening entirely, simply by moving any entry I want to delete, to the bottom of the list first.

Hope that helps in finding the cause of this issue.


Request:
I'm working with pointers a *lot* lately. One feature I'd love to see added, is the ability to right-click a pointer value, click "Browse this memory region" and have it prompt "For the pointer?" "Or the value pointed at, by the pointer?" much like the right-click scans do now.

If you're entirely too backed up to fulfill such requests, let me know and I'll surely learn delphi, at least enough to help find/repair such issues. Being a coder though, I know when I code something, and someone explains an "odd" issue to me, I usually know exactly what the problem is =).

Thanks for listenin'

- Zhoul
Back to top
View user's profile Send private message AIM Address
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sun Oct 30, 2005 6:12 am    Post subject: Reply with quote

The trainer maker is a low-priority for me, but i'll see if I can find the bug if I have time.

about that sugestion: I'll add it, I was having the same problem

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Zhoul
Master Cheater
Reputation: 1

Joined: 19 Sep 2005
Posts: 394

PostPosted: Fri Nov 04, 2005 12:05 am    Post subject: Reply with quote

When you go to look for this bug, while you're in the area, maybe you can cure another one which is related (and possibly part of the cause).

- If I have a list of entries, 10 long.
- Then I delete one of the entries.
- Then I re-size the window, to fit the remaining 9 entries.
- A scroll bar appears on the sample trainer to the right, as if I have a 10th entry.

This gets *really* noticible if I were to remove 2,3,4,5 entries. It appears that the CE trainer-maker thinks I still have a 10 count trainer, when I really have a 5 count trainer.

I 'get around this' by writing the trainer, closing the trainer-maker, then re-opening the newly created .exe (as it re-counts the values).

I believe this happens even if I use the method of deleting entries and not getting entry duplication, described in my previous post (which was to move entries to the bottom before deleting).

It would appear that each deletion creates a 'phantom' entry, which sticks around until the trainer is generated and re-opened.

- Zhoul
Back to top
View user's profile Send private message AIM Address
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Nov 05, 2005 6:42 pm    Post subject: Reply with quote

regarding the first bug: solved
in case you'd like to know:

changed:
Code:

  for i:=selectedindex to length(trainerdata)-2 do
     trainerdata[selectedindex]:=trainerdata[selectedindex+1];

to:
Code:

  for i:=selectedindex to length(trainerdata)-2 do
     trainerdata[i]:=trainerdata[i+1];



And the second bug (same size after deletion) was caused because it didn't call the resize method for the cheatlist object

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Zhoul
Master Cheater
Reputation: 1

Joined: 19 Sep 2005
Posts: 394

PostPosted: Wed Nov 23, 2005 7:46 am    Post subject: Reply with quote

w00t, GJ DB, TY VM Cool
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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