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 


help with this code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
orinari
How do I cheat?
Reputation: 0

Joined: 30 Apr 2017
Posts: 1

PostPosted: Sun Apr 30, 2017 7:48 pm    Post subject: help with this code Reply with quote

I'm tring to use this caode for rpg maker mv and it gives me an error every time I try to make this into a value type wondering whats wrong



typename="RPG maker MX"
bytecount=4  --number of bytes of this type
functionbasename="RPGMakerMX"

function RPGMakerMX_bytestovalue(b1,b2,b3,b4,address)
 local DataAddress=3+(b1+b2*256+b3*65536+b4*16777216);
  if ((DataAddress)%4 ~= 0 or DataAddress<0x1000) then --return 0 if DataAddress isn't a valid 32bit aligned address
    return 0
  else
    return readDouble(DataAddress) --return (double) [address]+3
  end
end

function RPGMakerMX_valuetobytes(i,address)
  local OriginalValue=readInteger(address)
  local ReturnValue=dwordToByteTable(OriginalValue);
  writeDouble(OriginalValue+3,i) --write i at [address]+3
return ReturnValue[1],ReturnValue[2],ReturnValue[3],ReturnValue[4]

end
return typename,bytecount,functionbasename



error message reads [string "typename="RPG Maker MV" ..."]:2 unexpected symbol near '<\194>'
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