Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
HTCheater authored Jan 29, 2023
1 parent 31ea449 commit d7c7008
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Il2CppExplorer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ end

-- Get field value in instance from instances table specified by index

function explorer.getField(instance, offset, offsetX32, type)
function explorer.getField(instance, offset, offsetX32, valueType)
if type(instance) ~= 'table' then
explorer.print("πŸ”΄ explorer.getField: expected table for parameter instance, got " .. type(instance))
return nil
Expand All @@ -281,6 +281,10 @@ function explorer.getField(instance, offset, offsetX32, type)
explorer.print("πŸ”΄ explorer.getField: expected number for instance.address, got " .. type(instance.address))
return nil
end
if type(valueType) ~= 'number' then
explorer.print("πŸ”΄ explorer.getField: expected number for valueType, got " .. type(valueType))
return nil
end
if not isx64 then
offset = offsetX32
end
Expand All @@ -293,7 +297,7 @@ end

-- Edit field value in instance from instances table specified by index

function explorer.editField(instance, offset, offsetX32, type, value)
function explorer.editField(instance, offset, offsetX32, valueType, value)
if type(instance) ~= 'table' then
explorer.print("πŸ”΄ explorer.editField: expected table for parameter instance, got " .. type(instance))
return
Expand All @@ -302,8 +306,8 @@ function explorer.editField(instance, offset, offsetX32, type, value)
explorer.print("πŸ”΄ explorer.editField: expected number for instance.address, got " .. type(instance.address))
return
end
if type(type) ~= 'number' then
explorer.print("πŸ”΄ explorer.editField: expected number for parameter type, got " .. type(type))
if type(valueType) ~= 'number' then
explorer.print("πŸ”΄ explorer.editField: expected number for parameter valueType, got " .. type(valueType))
return
end
if type(value) ~= 'number' then
Expand Down Expand Up @@ -459,15 +463,15 @@ function explorer.isFunctionPointer(address, className)
return true
end

function explorer.readValue(addr, type)
function explorer.readValue(addr, valueType)
if type(addr) ~= 'number' then
explorer.print("πŸ”΄ explorer.readValue: expected number for parameter addr, got " .. type(addr))
return 0
return
end

if type(type) ~= 'number' then
explorer.print("πŸ”΄ explorer.readValue: expected number for parameter type, got " .. type(type))
return 0
if type(valueType) ~= 'number' then
explorer.print("πŸ”΄ explorer.readValue: expected number for parameter valueType, got " .. type(valueType))
return
end
local t = {}
t[1] = {}
Expand Down

0 comments on commit d7c7008

Please sign in to comment.