Jump to content
  • 0

Why is my game always detected as 64bit?


SamePerson

Question

Posted

I want to make public script automatically detect bit of game, but always detect 64bit even though my game lib is arm-v7a/32bit

Example:

v = gg.getTargetInfo()

if v.x32 then -- if 32BIT goto
 -- 32bit function --
else -- if 64BIT goto
 -- 64bit function --
end

Or

v = gg.getTargetInfo()

function EX()
if v.x32 == true then -- if 32BIT goto
  -- 32bit function --
end
if v.x32 == false then -- if 64BIT goto
  -- 64bit function --
end
end

How can possible i fix it?

*Sorry for my bad english, I was helped by google translate*

5 answers to this question

Recommended Posts

Posted

because there is no such gg.targetInfo().x32 you can use
 

local target = gg.getTargetInfo()

if (not target) then
    gg.alert("Failed to get target info.")
    do return end
end

You just have to invert your condition to test for 32 or 64 bit


if (target.x64) then
    -- gg.alert("This script is not compatible with 64-bit.")
    -- do return end
end

 

if (not target.x64) then
    -- gg.alert("This script is not compatible with 32-bit.")
    -- do return end
end

 

Posted

nvm, already fixed

v = gg.getTargetInfo()

if v.x64 then
   -- gg.alert("Detect 64BIT")
   else
   -- gg.alert("Detect 32BIT")
end

I forgot, too fixated use v.x32 because my game lib

Btw thanks 

Posted

[ @SamePerson ]
---
You can just do else-if chain:

v = gg.getTargetInfo()

if v.x64 then
	print('Is x64-bit')
elseif v.x32 then
	print('Is x32-bit')
else --Relocate if "V" is empty / both x64 & x32 doesn't exist.
	print('Target is not found!')
end

---

Posted
22 hours ago, Xaviesz said:

[ @SamePerson ]
---
You can just do else-if chain:

v = gg.getTargetInfo()

if v.x64 then
	print('Is x64-bit')
elseif v.x32 then
	print('Is x32-bit')
else --Relocate if "V" is empty / both x64 & x32 doesn't exist.
	print('Target is not found!')
end

---

I guess there is only x64 and it return a bool either true or false , x32 is not valid parameter 
image.thumb.png.991783df241d4b12bfb81d2c5c8ff99a.png
read more

Posted

[ @XEKEX ]
---
You're right, just place with "not" then:

if v.x64 then
	print('Is x64-bit')
elseif (not v.x64) then
	print('Is x32-bit')
else --Relocate if "V" is empty / both x64 & x32 doesn't exist.
	print('Target is not found!')
end

---

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.