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 


Cheat Engine Forum Index
PostGo back to topic
Dark Byte
Site Admin
Reputation: 458
Joined: 09 May 2003
Posts: 25288
Location: The netherlands

PostPosted: Fri Feb 23, 2018 2:28 am    Post subject:

Code:

function setbit(address, bitnr, state)
  if (bitnr>7) then error('setbit only works for byte sizes. rewrite this for bigger values') end
  b=readBytes(address,1)
  if (state==1) then
    b=b | (1<<bitnr)
  else
    b=b & ~(1<<bitnr)
  end
  writeBytes(address,b)
end


bitnumber counts from 0
_________________
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
Post reviews:   Approve 2
Author Review
sbryzl
Review: Approve
Post reference:
ReviewPosted: Sat Feb 24, 2018 1:17 pm


Back to top
View user's profile Send private message
Razi
Review: Approve
Post reference:
ReviewPosted: Sun Sep 02, 2018 8:29 am

Thank you
Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites