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 


C-Script Engine

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sat Feb 14, 2009 7:33 pm    Post subject: C-Script Engine Reply with quote

You just introduced the engine to me, but there seems to be a problem with it. Whenever I try to use the if-else loop, it only executes the code in the if loop. Is it just me?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Feb 14, 2009 7:57 pm    Post subject: Reply with quote

check the condition of the if statement. (e.g. used a = instead of == tends to return true if the value isn't 0)
Also, perhaps some extra typecasting might be needed in case the c-scripter might have a problem figuring out what you meant and then just chooses true

_________________
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
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sat Feb 14, 2009 8:00 pm    Post subject: Reply with quote

I used a < operator, but I'll check again and report back to you.

Edit:
Code:
if(0x02423FC4 > 50)
{
   *(int *)0x02423FC4--;
} else {
   *(int *)0x02423FC4 = 100;
}


The value stayed the same regardless if it was greater than 50 or less. I used the "call address" it gave me.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Feb 14, 2009 8:10 pm    Post subject: Reply with quote

that is because 0x02423FC4 = 37896132
and yes, that actually IS bigger than 50


try
if(*(int *)0x02423FC4 > 50)

_________________
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
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sat Feb 14, 2009 8:20 pm    Post subject: Reply with quote

It stays the same value. It's as if the call wasn't even there. Any ideas to why (I'm trying to use it for step 1 of the CE Tutorial)?

Edit:

Random question, but do you have a Facebook?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Feb 14, 2009 8:48 pm    Post subject: Reply with quote

change your script to:
if (*(int *)0x02423FC4 > 50)
{
(*(int *)0x02423FC4)--;
} else {
*(int *)0x02423FC4 = 100;
}

it doesn't like pointer math without braces

also, looks like there is an initialization problem with the ce script parser if you just click execute(so has nothing to do with injecting into a process). To get by that open and close the c-script console

and no, I don't have a facebook

_________________
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
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Sat Feb 14, 2009 11:43 pm    Post subject: Reply with quote

The parenthesis worked. Thanks for the help. If only using WPM was as simple as this...
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