Results 1 to 3 of 3
  1. #1
    TryToCheat00's Avatar
    Join Date
    Sep 2018
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    Question Problem with adding a hex value to a pointer

    Hello guys,

    I am having an issue with adding the LocalPlayer Offset to the Base Address of a game (Assault Cube).

    The values i want to add together are:
    base address = 00400000
    +
    LocalPlayerOffset = 0x109B74

    (Look at the Screenshot of the Code in the Attachments)


    and as you can see in the console the result is 00826DD0
    but this is wrong and i checked it in the internet with an hex calculator and there the result was correct

    (Look at the Screenshot of the Hex Calculator in the Attachments)


    the actual result should be 00509B74

    My Question is, why does visual studio calculate these two values wrong (different)?

    Appreciate any help that i receive!

    Best regards,

    TryToCheat00
    Attached Thumbnails Attached Thumbnails
    Getting LocalPlaAdd Problem Code SS.PNG  

    Hex calculator value.PNG  


  2. #2
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    797
    Reputation
    593
    Thanks
    26,314
    you posted the issue by yourself
    Code:
    base address = 00400000 // <- not an hex value, maybe you mean 0x400000 ?
    +
    LocalPlayerOffset = 0x109B74

  3. #3
    Icesycthe7's Avatar
    Join Date
    Aug 2018
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    there is alot wrong in your picture, for starters for assualt cube it has a static base so you don't need to add it in the first place just use the final address, secondly you should use the multiplayer base and not the single player base, thirdly your making everything a pointer to the value when u need to just add the value itself.

    should be more along the lines of
    uintptr_t base = 0x400000;
    uintptr_t localPlayerBase = 0x109B74; //wrong btw

    uintptr_t localPlayer = base + localPlayerBase; //this will do the simple addition you want but you actually need the value contained here. so learn how pointers work and this will be easy for you

Similar Threads

  1. [Help Request] Problems with adding tiles[AS3]
    By KingFizzh in forum Realm of the Mad God Private Servers Help
    Replies: 0
    Last Post: 10-03-2016, 11:27 AM
  2. [Help Request] Fabiano Source problems with adding enemies/monsters
    By xXEbolaMuchXx in forum Realm of the Mad God Private Servers Help
    Replies: 2
    Last Post: 07-02-2015, 03:26 PM
  3. Recent problems with adding MM's on MSN/WLM
    By Color in forum Middleman Lounge
    Replies: 0
    Last Post: 07-14-2013, 07:32 PM
  4. Problem with adding a custom menu to aj
    By $onny in forum DayZ Discussion
    Replies: 1
    Last Post: 01-28-2013, 01:05 PM
  5. [Help]Problem with Drawing + Value
    By HazXoD3D in forum Visual Basic Programming
    Replies: 0
    Last Post: 03-20-2010, 06:47 PM