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 


VB6 other way of changing variable

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Thu Apr 03, 2008 1:39 pm    Post subject: VB6 other way of changing variable Reply with quote

if i just use setvariable() there always is an error
it should ampliefy like for example the value is 12 you deal 7 dmg = 19 dmg dealt
but when i use setvariable and set it 12 and then deal 7 dmg
the dmg dealt is 7120 -.-

_________________
Back to top
View user's profile Send private message
jason744
Grandmaster Cheater
Reputation: 0

Joined: 25 Nov 2007
Posts: 638

PostPosted: Thu Apr 03, 2008 2:05 pm    Post subject: Reply with quote

Then that's probably just how the game is coded.
_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Apr 03, 2008 2:09 pm    Post subject: Reply with quote

SetVariable() makes the variable to string, so when it* adds to health, or DMG, it's like adding text to the current variable.
*The flash game.
Back to top
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Fri Apr 04, 2008 6:25 am    Post subject: Reply with quote

Moller wrote:
SetVariable() makes the variable to string, so when it* adds to health, or DMG, it's like adding text to the current variable.
*The flash game.

i understand Surprised
and so the calculation isnt 7 + 12 (without changes by VB) = 19
its then: 7 + [TEXT] = 7[TEXT]0 (cause value still is 0)
but how can i make the flash game and VB knows its a number (and no text) ?

_________________
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Fri Apr 04, 2008 6:34 am    Post subject: Reply with quote

92Garfield wrote:
Moller wrote:
SetVariable() makes the variable to string, so when it* adds to health, or DMG, it's like adding text to the current variable.
*The flash game.

i understand Surprised
and so the calculation isnt 7 + 12 (without changes by VB) = 19
its then: 7 + [TEXT] = 7[TEXT]0 (cause value still is 0)
but how can i make the flash game and VB knows its a number (and no text) ?

I don't think there's any way.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Apr 04, 2008 6:36 am    Post subject: Reply with quote

Use a conversion method for the string. Something like:

Code:
Dim strStringNumber As String
strStringNumber = "7" & Text1.Text & "0"

Dim dwNumber As Long
dwNumber = CLng(strStringNumber)


Which will convert the string to a long. But if you are passing it to SetVariable, it will have to be a string. Seems to me like you are either not correctly combining the number like you want or something.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Fri Apr 04, 2008 7:14 am    Post subject: Reply with quote

..shit^^
i see you dont understood me the numbers where just examples..
so i can only set variables to strings?
anyone knows a possiblity to avoid that .. bug?

_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Apr 04, 2008 1:20 pm    Post subject: Reply with quote

It's not a bug, it's how Flash handles the values. Everything is a string but will still be interpreted as a number if you use a number as the string.

So if your string is 123, it will be handled as if it was a number. If you use a123, it will attempted to use it as a number, (Possibly use it as a the hex value, not 100% sure on that since I don't touch Flash much.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Fri Apr 04, 2008 1:37 pm    Post subject: Reply with quote

Wiccaan wrote:
It's not a bug, it's how Flash handles the values. Everything is a string but will still be interpreted as a number if you use a number as the string.

So if your string is 123, it will be handled as if it was a number. If you use a123, it will attempted to use it as a number, (Possibly use it as a the hex value, not 100% sure on that since I don't touch Flash much.)

no thats my problem
on this variable it always handles what i type in as text (i think thats why that happens!)
and i need to find a different way Sad

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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