Kyl3 How do I cheat?
Reputation: 0
Joined: 01 Jun 2013 Posts: 1 Location: Brazil
|
Posted: Sat Jun 01, 2013 2:19 pm Post subject: A little doubt about structs with pointers |
|
|
Hey,
I have the pointer to the structure of the player, and tested to access the values I wanted, but I got a problem (in fact I'm not sure if it really is one), which consists of the following: I have, for example, the first element in this structure the player's health, the second to the eleventh unknown values, and on the twelfth I have the ammo player's primary weapon.
My question is: I really need to add "char unknown" until the twelfth, or have some way to "pass" it? Drawing what I said:
| Code: |
// Is possible to do this? If yes, how?
typedef struct {
int HP; // first element
// second to eleventh are ignored in the struct
int SecAmmo; // twelfth
} Player_Base;
|
How I'm having to use (not very good):
| Code: |
typedef struct {
int HP;
char unk2[128]; char unk3[128]; char unk4[128]; char unk5[128]; char unk6[128]; char unk7[128]; char unk8[128]; char unk9[128]; char unk10[128]; char unk11[128];
int SecAmmo; // 12
} Player_Base;
|
Thanks in advance.
|
|