01.02.2016, 06:08
Great tutorial !!
I have a problem with the structures in that use structures to store data but if I put "-fpack-struct = 1" run time errors occur. Example:
Windows fix:
As I can fix this in linux?
I have a problem with the structures in that use structures to store data but if I put "-fpack-struct = 1" run time errors occur. Example:
pawn Code:
struct CPlayer
{
BYTE padding[10529];
float fHealth;
};
struct CPlayerPool
{
BYTE padding[154012];
CPlayer *pPlayer[MAX_PLAYERS];
};
struct CNetGame
{
BYTE padding[8]; // offsets starts from 0
CPlayerPool *pPlayerPool; // stars from 8, ends at 12
};
CNetGame *pNetGame = (CNetGame*)0x4F6CC8;
struct _Player // How do I not pack this structure in linux?
{
int a;
bool c;
};
pawn Code:
#pragma pack(push, 1)
struct CPlayer
{
BYTE padding[10529];
float fHealth;
};
struct CPlayerPool
{
BYTE padding[154012];
CPlayer *pPlayer[MAX_PLAYERS];
};
struct CNetGame
{
BYTE padding[8]; // offsets starts from 0
CPlayerPool *pPlayerPool; // stars from 8, ends at 12
};
CNetGame *pNetGame = (CNetGame*)0x4F6CC8;
#pragma pack(pop)
struct _Player
{
int a;
bool c;
};