Jump to content

Search the Community

Showing results for tags 'function calls'.

  • Search By Tags

    Type tags separated by commas.
    For example, the common name of the game: PUBG, Free Fire, Rules of Survival, Critical Ops, Mobile Legends: Bang Bang, etc.
  • Search By Author

Content Type


Forums

  • GameGuardian
    • Requests
    • Help
    • Guides
    • Cheats
    • Video Tutorials
    • Unintended Effects
  • General
    • General Discussion
    • Introduce yourself (:
    • Announcements
    • Website suggestions/Bugs
  • Downloads Support
    • Apps
    • LUA scripts
  • Online Multiplayer Mods
    • Altering Online Games with Gameguardian
    • Download Mods
  • Other Hacks
    • Tutorials
    • Non-GameGuardian
  • Archive
    • Archived topics

Categories

  • Official Downloads
  • Virtual spaces (no root)
  • LUA scripts
    • Forward Assault
    • Free Fire
    • PUBG
    • Rules of Survival
    • Templates
    • Tools
  • Test applications
  • Other

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Device


Discord ID

Found 1 result

  1. Hi, i stumbled on a new issue while learning. Or i would say that i am not understanding the mechanic i just did because its not how i readed it from docs. instructionSet = gg.getValues(values) -- create new table with address, flags, value -- instructionSet function instructions(instructionSet) -- function parameters (instructionSets) if (instructionSet < 0x40) then print(type(instructionSet)) print("this is 32 bits") else print("this is 64 bits") end return instructionSet end print("instructionset", instructions(instructionSet[1].value)) -- function call (instructions(...) function dataTypes(dword, instructions) if (dword*10 == instructions[1].value) then result = dword print("dataType is size four") else result = qword print("dataType is size eight") end return result end print("dataType", dataTypes(4, instructionSet)) currently in the first function, instructionSet is of type number. and compared to the hex 0x40 but if i change the name of the parameter of the function "instructions" function instructions(instructionSet) -- function parameters (instructionSets) instructionSet is then not recognized anymore as type number but changes to a type table. I am then forced to let it know that i want to compare int values specifying field value, (the fact that it changes from number to table i don't understand) if (instructionSet[1].value < 0x40) then In some sources i understand that parameters can basically have any name. So if i use the table name as a function parameter i should only be able to use them in the function it self. Or at least, the functionality of the body in the functions should not be directly effected by some parameter change. Then there is the other part of the script which i have questions about. In the function dataTypes function dataTypes(dword, instructions) i use "instructions" as a parameter which i don't think would be an issue. And as values i use "instructionSet" which is where i would as my other question. print("dataType", dataTypes(4, instructionSet)) why is instructionSet here of type table? during comparison with 0x40 its type was a number. Then in the other function it changed back to type table. then when i want to compare it in function dataTypes i am forced to compare it as a table. which is for my current understanding odd. Some insights would be great. Thank you.
×
×
  • 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.