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 


need help with trackbar

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Wed Jun 12, 2019 9:24 pm    Post subject: Reply with quote

so use the value from the trackbar instead of a hardcoded number... um presumably CETrainer.CETrackBar1.Value.... ah, actually it's Position not Value, glad I checked in celua.txt Smile
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Wed Jun 12, 2019 11:15 pm    Post subject: Reply with quote

Maybe something like this?

Code:
function trbarpos()
local i = CETrainer.CETrackBar2.Position
CETrainer.CELabel1.Caption = CETrainer.CETrackBar2.Position
local mystr=readString(baseAddr+offset*(i)) --- or do something
if(mystr==nil)then
-- do something
end
end
CETrainer.CETrackBar2.onChange = trbarpos


But I saw on your code that 'mystr' value already read by this loop process:

Code:
for i=8575,99999 do
isValid=true
mystr=readString(baseAddr+offset*(i))
if(mystr==nil)then
break
end

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Wed Jun 12, 2019 11:33 pm    Post subject: Reply with quote

try use : tonumber(i)

and also try to understand what is error message mean.
In your case is 'The offset' is unknown or not defined yet or offset is a string

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
nebusk
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 07 Jun 2019
Posts: 10

PostPosted: Fri Jun 14, 2019 5:07 pm    Post subject: trackbar Reply with quote

try use : tonumber(i)

where do i put or replace the tonumber(i)
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Fri Jun 14, 2019 11:56 pm    Post subject: Reply with quote

IDK..why you deleted your post?
Is the code has yours?. Or you just re-created a game trainer using that code from somewhere.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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 Lua Scripting 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