Vice City: Multiplayer

Off-Topic => Off-Topic General => Topic started by: EK.IceFlake on May 24, 2017, 05:16 PM

Title: Wtf are these traps
Post by: EK.IceFlake on May 24, 2017, 05:16 PM
When trying to reverse engineer squirrel bytecode I get some traps
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FgvYWNfz.png&hash=a32386036c54c3c39c2373aa8c4002a77e23b385)
Are they to simply make life hard for reverse engineers or do they serve some actual purpose?
Title: Re: Wtf are these traps
Post by: . on May 24, 2017, 05:48 PM
Just a random guess. A scope/context. That is: a pair of curly braces.

function A(x)
{
    local y;
    if (x == y)
    {
        local z = x+y;
        print(z);
    } // <- Trap variables (z) in this scope and release them here
    // `z` doesn't exist here
} // <- Trap variables (x/y) in this scope and release them here
 A(3);
 // x,y don't exist here
Title: Re: Wtf are these traps
Post by: Stormeus on May 31, 2017, 05:33 AM
Fun fact, these actually aren't TRAPs, they're PARTs in little-endian.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FHcW9ZhC.png&hash=398f8b3f9fdf2c3f7801085057817835c16fa035)
Title: Re: Wtf are these traps
Post by: EK.IceFlake on May 31, 2017, 05:41 AM
Quote from: Stormeus on May 31, 2017, 05:33 AMFun fact, these actually aren't TRAPs, they're PARTs in little-endian.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FHcW9ZhC.png&hash=398f8b3f9fdf2c3f7801085057817835c16fa035)
Is that Visual Studio?
Title: Re: Wtf are these traps
Post by: Stormeus on May 31, 2017, 05:47 AM
Quote from: EK.IceFlake on May 31, 2017, 05:41 AM
Quote from: Stormeus on May 31, 2017, 05:33 AMFun fact, these actually aren't TRAPs, they're PARTs in little-endian.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FHcW9ZhC.png&hash=398f8b3f9fdf2c3f7801085057817835c16fa035)
Is that Visual Studio?

Yes