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 


What does the @ in a script represent?

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

Joined: 27 Apr 2013
Posts: 306

PostPosted: Sun Aug 07, 2016 7:01 pm    Post subject: What does the @ in a script represent? Reply with quote

I'm digging through scripts from notable people here to see how they prefer to do things and I've noticed things like @f or @@ noted more than once in a script. An example of what I'm referencing is below, from one of Sunbeam's scripts. What do those represent? Thanks.

Code:
[ENABLE]

alloc( GodMode, 256, Game.dll )
label( Damage )
registersymbol( Damage )
label( back )

GodMode:
mov ecx,[ebx]
test ecx,ecx
je back+50
call Game.dll+668890
mov ecx,edi
mov esi,[eax+268]
call Game.dll+668890
mov eax,[eax+268]
test esi,esi
je short @f
test eax,eax
jne back+50
mov eax,0
jmp back+4D
@@:
test eax,eax
je back+50
fld [ebp+C]
fld [Damage]
fmul st(0),st(1)
fstp [ebp+C]
fstp st(0)
@@:
jmp back+50

Damage:
dd (float)12.0

Game.dll+67E0C6:
jmp GodMode
back:

[DISABLE]

Game.dll+67E0C6:
mov eax,[eax+10]
mov eax,[eax]

unregistersymbol( Damage )
dealloc( GodMode )

_________________
Back to top
View user's profile Send private message Visit poster's website
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Aug 07, 2016 7:04 pm    Post subject: Reply with quote

They're anonymous labels:

Quote:
FASM supports labels that use no identifier or label name.

@@: represents an anonymous label. Any number of anonymous labels can be defined.
@b refers to the closest label that can be found when looking backwards in source.
@f refers to the closest label that can be found when looking forwards in source.


They basically just save time by not having to define any labels.
Back to top
View user's profile Send private message
h3x1c
Master Cheater
Reputation: 17

Joined: 27 Apr 2013
Posts: 306

PostPosted: Sun Aug 07, 2016 7:07 pm    Post subject: Reply with quote

Thanks, Methos. So in the case of the script above, the second @@ is there as a fail-safe, basically?
_________________
Back to top
View user's profile Send private message Visit poster's website
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Aug 07, 2016 7:24 pm    Post subject: Reply with quote

In this case, it doesn't look like the second @@ label is needed.
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 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