dev icon indicating copy to clipboard operation
dev copied to clipboard

nested expressions

Open x87 opened this issue 9 months ago • 2 comments

0@ = read_memory ((get_this_script_struct) + 0x10) size 4 virtual_protect 0

where (expr) essentially means: take the left-hand side variable and make a new command var = code

    0@ = get_this_script_struct
    0@ += 0x10
    0@ = read_memory 0@ size 4 virtual_protect 0

another example:

nlvar0 = WEAPONTYPE_SHOTGUN * SIZEOF_CWEAPONINFO
nlvar0 += aWeaponInfo
nlvar0 = Memory.Read(nlvar0, DWORD, false)

nlvar0 = Memory.Read(((WEAPONTYPE_SHOTGUN * SIZEOF_CWEAPONINFO) + aWeaponInfo), DWORD, false)

Originally posted by @x87 in https://github.com/sannybuilder/dev/issues/243#issuecomment-1697819960

x87 avatar Oct 31 '23 02:10 x87