comment syntax/location in .CT code

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
User avatar
dna
Expert Cheater
Expert Cheater
Posts: 79
Joined: Sun Mar 31, 2019 12:14 am
Reputation: 10

comment syntax/location in .CT code

Post by dna »

I posted this in the thread for the specific table im editing, but no response. This might be the appropriate place for this question.

I need some expert help from the wise CT devs around here please. I have a few questions about editing the table. I have added a few entries under the "+Bulk GetItem (packs, quests, materials)" section (and also added the XP multiplier feature from swedishMagyar's table, with his permission). Everything works just fine after testing it for a few while. With the recent update, I copied my edits into the new table, but decided to add some comments throughout my code to mark my edits and beginning/end of some snippets. I've definitely mad a mistake, having comments in certain spots of a code block. Comments I've placed in other areas are just fine, i.e. dq 000000000000C350 //Quantity 50000 .. but the standalone comment lines sometimes will add a blank entry/checkbox to the table

In short, some of my comments are causing blank entries in the table when placed between 2 CheatEntry blocks (i.e. after an ending </CheatEntry> and before the next <CheatEntry> ..

Screenshots:
piece of the code showing some different comments (marked orange and red. Red comments are fine):[/color] Image

WITH the comment lines
Image

WITHOUT the comment lines:
Image

Ive tried reading some guides and found a few threads about commenting, but wasnt able to find information about comment placement or about the specific prob im having. Do I need to escape the comment characters?

Any help would be appreciated

TimFun13
Expert Cheater
Expert Cheater
Posts: 1354
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 6

Re: comment syntax/location in .CT code

Post by TimFun13 »

It's not XML, XML doesn't have comments. The comments in the "AssemblerScript" element are fine as that's inside an element, but the other ones are in between elements.

User avatar
dna
Expert Cheater
Expert Cheater
Posts: 79
Joined: Sun Mar 31, 2019 12:14 am
Reputation: 10

Re: comment syntax/location in .CT code

Post by dna »

ShyTwig16 wrote:
Fri Mar 19, 2021 10:56 pm
It's not XML, XML doesn't have comments. The comments in the "AssemblerScript" element are fine as that's inside an element, but the other ones are in between elements.
Hi Tim, thanks for your help. That makes sense, I should have realized that.. I wonder if you can use the XML "comment" syntax like <!-- my comment -->
I might test this out later

TimFun13
Expert Cheater
Expert Cheater
Posts: 1354
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 6

Re: comment syntax/location in .CT code

Post by TimFun13 »

Yeah if I remember correctly XML technically doesn't support comments, but almost all implementations accept HTML comment style. But XML might have been updated to include comments.

Post Reply

Who is online

Users browsing this forum: No registered users