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 


Please help me on this.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
12103com
Newbie cheater
Reputation: 0

Joined: 12 Jul 2014
Posts: 14

PostPosted: Sun Aug 03, 2014 3:24 am    Post subject: Please help me on this. Reply with quote

So, I want to use this:
Code:
elseif UDF1.CETrackBar1.Value == 5 then


But then, it says i call a nil value. Yes, i do have a bar.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sun Aug 03, 2014 3:40 am    Post subject: Reply with quote

Trackbar has no Value property, it has Position though
Rain main.lua and check the trackbar class description

_________________
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
12103com
Newbie cheater
Reputation: 0

Joined: 12 Jul 2014
Posts: 14

PostPosted: Sun Aug 03, 2014 4:50 am    Post subject: ok Reply with quote

So this is my code;

Code:
if UDF1.CETrackBar1.Position == "7" then
table.insert(bytes,3,7)
elseif UDF1.CETrackBar1.Position == "6" then
table.insert(bytes,3,6)
elseif UDF1.CETrackBar1.Position == "5" then
table.insert(bytes,3,5)
elseif UDF1.CETrackBar1.Position == "4" then
table.insert(bytes,3,4)
elseif UDF1.CETrackBar1.Position == "3" then
table.insert(bytes,3,3)
elseif UDF1.CETrackBar1.Position == "2" then
table.insert(bytes,3,2)
elseif UDF1.CETrackBar1.Position == "1" then
table.insert(bytes,3,1)
end


it still says i'm calling a nil value.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sun Aug 03, 2014 5:08 am    Post subject: Reply with quote

Is the name of the form UDF1 and the name of the trackbar CETrackBar1 ? If not, adjust that in the code

also, those compares will fail as Position is an integer (and for some reason lua doesn't convert it for you)
do it like:
Code:

if UDF1.CETrackBar1.Position == 7 then


I've attached an example cheat table with this script

also,
Code:

table.insert(bytes,3, UDF1.CETrackBar1.Position)

is less code and has the same effect



example.ct
 Description:

Download
 Filename:  example.ct
 Filesize:  1.27 KB
 Downloaded:  418 Time(s)


_________________
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
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