Jump to content

CmP

Ascended
  • Content Count

    384
  • Donations

    $0.00 
  • Joined

  • Last visited

  • Days Won

    24

CmP last won the day on May 5

CmP had the most liked content!

Community Reputation

407 Boss

About CmP

  • Rank
    Experienced Member

Additional Information

  • Android
    7.x (Nougat)
  • Device
    Xiaomi Redmi Note 4X

Recent Profile Visitors

10,205 profile views
  1. CmP

    Unexpected error

    If the value is frozen and you need to change it to other value without changing freeze state of the value, then modify "value" field of required sub-table and call "addListItems" function. Doing the same, but calling "setValues" function doesn't work for frozen values, if I am not mistaken.
  2. CmP

    Unexpected error

    The error occurs because at least one of sub-tables has no "value" field specified when you pass the table to "setValues" function. To set "value" fields of all sub-tables to current values of the elements, the following code can be added right after definition of "lak" table: lak = gg.getValues(lak)
  3. This way should work in most cases: local info = gg.getTargetInfo() if info == nil then print("Can't retrieve information about the process") else if info.x64 then print("The process is 64-bit") else print("The process is 32-bit") end end
  4. Byte value of 0xB8 is -72 in decimal if you interpret it as signed byte and 184 if you interpret is as unsigned byte, so these are just different interpretations of the same value. Just convert them to hexadecimal and extract byte values from the result. I have no idea why it is so hard to understand. Example: convert 12345 decimal value to bytes. 1. 12345 = 0x3039 2. Byte values are 0x30 and 0x39 (to be searched in this order) or 48 and 57 in decimal.
  5. Yes, you have everything that is needed to find the value and to modify it to any other (in allowed range). To search for 3000 try search string "11;184::2" with type "Byte". If there will be more than 2 results, you will need to do refine search by changing the value in the game and searching the new value the same way. For example, if the new value is 2500, you will need to use the following search string "9;196::2".
  6. More like you need to find out the values of first and seconds bytes that together correspond to the value you need. The following code may work for values in range [0;32767]: local value = 3000 local firstByte = value % 256 local secondByte = (value >> 8) % 256 local searchString = string.format("%d;%d::2", secondByte, firstByte) print(searchString) -- 11;184::2 As you see, this is slightly incorrect. That would be correct for value 3003. Also you may want ordered group search like in my example in which case you need to search for bytes in the correct order.
  7. The values for bytes that I provided are hexadecimal. So with 10 I meant 0x10 (16) and with 27 I meant 0x27 (39). Try them. Also from your video it seems that bytes do not need to be swapped so ignore that step.
  8. No need to re-search it. There is "getValues" function to get values at desired addresses.
  9. Convert the value to hexadecimal and swap first byte with the second one. Example for 10000: 1. 10000 is 0x2710. 2. "27 10" after swap is "10 27".
  10. Possibly that the bytes are simply reversed. 0x64 is 100. Try "00 01" to see the result. 256 to be expected.
  11. Incorrect search string for type "Dword". "searchNumber" function returns string in case of failure so it is possible to check whether function completed successfully: local ret = gg.searchNumber("1.000", gg.TYPE_DWORD) if type(ret) == "string" then print("Error: " .. ret) else print("Success") end
  12. If there are results in results list, "searchNumber" function performs refine search. For new search don't forget to call "clearResults" function before calling "searchNumber" function. Second search happens instantly after the first one and only results from the first search are used to search in, that's why you get 0 results after both searches.
  13. CmP

    Error chainer.lua

    The crash occurred during execution of the code on line 20 of the script. Script is open-source so we can check the code of interest (lines 19-20 in this case): local ti = gg.getTargetInfo() local x64 = ti.x64 From error description and this code we can see that the error occurs because the call to "gg.getTargetInfo" function results in nil value being returned and saved in "ti" variable. Script expects table to be returned and accesses "x64" field of it, but nil is not a table and accessing fields of nil value is not a legal operation in Lua so script execution is terminated. This script needs the data that is normally returned by "gg.getTargetInfo" function to work. So the problem is that "gg.getTargetInfo" function returns nil for you. This may (or may not) mean that GG is unable to retrieve that data for some reason.
  14. Provide an example of what "io.open" function returns for existing file and non-existing one. You can use the following code for this: local path = "/path/to/a/file" print(io.open(path, "r"))
  15. function file_exists(name) local f=io.open(name,"r") if f~=nil then io.close(f) return true else return false end end Source: https://stackoverflow.com/a/499160
×
×
  • Create New...