Jump to content

  • Log In with Google      Sign In   
  • Create Account

xRisenx

Member Since 09 Oct 2012
Offline Last Active Feb 03 2014 12:20 AM

Posts I've Made

In Topic: Helbreath SQL (Help needed)

09 October 2012 - 09:01 AM

Here are the full function that saves character info when u log out


void CLoginServer::SaveCharacter(char* Data, MYSQL myConn)
{
char *cp, AccName[15], AccPwd[15], CharName[15], Location[15], MapName[15], BlockDate[25], SaveDate[25],
GuildName[25], GoodGuildName[50], LockedMapName[15], MagicMastery[105], Profile[260], GoodProfile[520], QueryConsult[10000];
sBYTE DownSkillIndex;
BYTE /*STR, DEX, VIT, INT, MAG, AGI,*/ Luck, Sex, Skin, HairStyle,
HairColor, Underwear, HungerStatus, FightzoneNumber,
FightzoneTicketNumber, CrusadeDuty, NItems, NBankItems, SkillMastery;
sWORD MapLocX, MapLocY, GuildRank, GuildID, CharID1, CharID2, CharID3, QuestRewardType;
WORD STR, DEX, VIT, INT, MAG, AGI, Level, Quest, CurQuestCount, SuperAttackLeft, Gizon, w,
IndexForItem, Index;
sDWORD Rating;
long elo;
DWORD HP, MP, SP, Exp, EK, TotalEK, PK, RewardGold, TimeLeftShutUp, TimeLeftRating, TimeLeftForceRecall,
TimeLeftFirmStaminar, QuestID, QuestRewardAmmount, Contribution, WarContribution, SpecialEventID,
ReserveTime, LockedMapTime, CrusadeGUID, ConstructionPoint, DeadPenaltyTime,
PartyID, SpecialAbilityTime, Appr1, Appr2, Appr3, Appr4, ApprColor, SkillSSN, CharID;
uint64 CurItemID;
BOOL Flag, IsQuestCompleted, bIsBankModified;
SYSTEMTIME SaveTime;
st_mysql_res *pQueryResult = NULL;
cItem *ItemInfo;
string itemQuery;
static long charIndexEnd = 252;
//uint32 bench = timeGetTime();
ZeroMemory(CharName, sizeof(CharName));
SafeCopy(CharName, Data, 10);
ZeroMemory(AccName, sizeof(AccName));
SafeCopy(AccName, Data+10, 10);
ZeroMemory(AccPwd, sizeof(AccPwd));
SafeCopy(AccPwd, Data+20, 10);
Flag = (BOOL)bGetOffsetValue(Data, 30);
CharID = GetCharID(CharName, AccName, myConn);
cp = (Data+31);
SaveTime.wYear = wGetOffsetValue(cp, 0);
SaveTime.wMonth = bGetOffsetValue(cp, 2);
SaveTime.wDay = bGetOffsetValue(cp, 3);
SaveTime.wHour = bGetOffsetValue(cp, 4);
SaveTime.wMinute = bGetOffsetValue(cp, 5);
SaveTime.wSecond = bGetOffsetValue(cp, 6);
ZeroMemory(SaveDate, sizeof(SaveDate));
sprintf(SaveDate, "%d-%d-%d %d:%d:%d", SaveTime.wYear, SaveTime.wMonth, SaveTime.wDay, SaveTime.wHour, SaveTime.wMinute, SaveTime.wSecond);
ZeroMemory(Location, sizeof(Location));
SafeCopy(Location, cp+7, 10);
ZeroMemory(MapName, sizeof(MapName));
SafeCopy(MapName, cp+17, 10);
MapLocX = (sWORD)wGetOffsetValue(cp, 27);
MapLocY = (sWORD)wGetOffsetValue(cp, 29);
ZeroMemory(GuildName, sizeof(GuildName));
SafeCopy(GuildName, cp+31, 20);
GuildID = wGetOffsetValue(cp, 51);
GuildRank = (sWORD)wGetOffsetValue(cp, 53);
HP = dwGetOffsetValue(cp, 55);
MP = dwGetOffsetValue(cp, 59);
SP = dwGetOffsetValue(cp, 63);
Level = wGetOffsetValue(cp, 67);
Rating = (sDWORD)dwGetOffsetValue(cp, 69);
STR = bGetOffsetValue(cp, 73);
VIT = bGetOffsetValue(cp, 75);
DEX = bGetOffsetValue(cp, 77);
INT = bGetOffsetValue(cp, 79);
MAG = bGetOffsetValue(cp, 81);
AGI = bGetOffsetValue(cp, 83);
Luck = bGetOffsetValue(cp, 84);
Exp = dwGetOffsetValue(cp, 85);
EK = dwGetOffsetValue(cp, 89);
PK = dwGetOffsetValue(cp, 93);
RewardGold = dwGetOffsetValue(cp, 97);
DownSkillIndex = (sBYTE)bGetOffsetValue(cp, 101);
CharID1 = (sWORD)dwGetOffsetValue(cp, 102);
CharID2 = (sWORD)dwGetOffsetValue(cp, 106);
CharID3 = (sWORD)dwGetOffsetValue(cp, 110);
Sex = bGetOffsetValue(cp, 114);
Skin = bGetOffsetValue(cp, 115);
HairStyle = bGetOffsetValue(cp, 116);
HairColor = bGetOffsetValue(cp, 117);
Underwear = bGetOffsetValue(cp, 118);
HungerStatus = bGetOffsetValue(cp, 119);
TimeLeftShutUp = dwGetOffsetValue(cp, 120);
TimeLeftRating = dwGetOffsetValue(cp, 124);
TimeLeftForceRecall = dwGetOffsetValue(cp, 128);
TimeLeftFirmStaminar = dwGetOffsetValue(cp, 132);
bIsBankModified = (BOOL)bGetOffsetValue(cp, 136);
ZeroMemory(BlockDate, sizeof(BlockDate));
SafeCopy(BlockDate, cp+137, 20);
Quest = wGetOffsetValue(cp, 157);
QuestID = wGetOffsetValue(cp, 159);
CurQuestCount = wGetOffsetValue(cp, 161);
QuestRewardType = (sWORD)wGetOffsetValue(cp, 163);
QuestRewardAmmount = dwGetOffsetValue(cp, 165);
Contribution = dwGetOffsetValue(cp, 169);
WarContribution = dwGetOffsetValue(cp, 173);
IsQuestCompleted = (BOOL)bGetOffsetValue(cp, 177);
SpecialEventID = dwGetOffsetValue(cp, 178);
SuperAttackLeft = wGetOffsetValue(cp, 182);
FightzoneNumber = bGetOffsetValue(cp, 184);
ReserveTime = dwGetOffsetValue(cp, 185);
FightzoneTicketNumber = bGetOffsetValue(cp, 189);
SpecialAbilityTime = dwGetOffsetValue(cp, 190);
ZeroMemory(LockedMapName, sizeof(LockedMapName));
SafeCopy(LockedMapName, cp+194, 10);
LockedMapTime = dwGetOffsetValue(cp, 204);
CrusadeDuty = bGetOffsetValue(cp, 208);
CrusadeGUID = dwGetOffsetValue(cp, 209);
ConstructionPoint = dwGetOffsetValue(cp, 213);
DeadPenaltyTime = dwGetOffsetValue(cp, 217);
PartyID = dwGetOffsetValue(cp, 221);
//PartyID = 0;
Gizon = wGetOffsetValue(cp, 225);
SpecialAbilityTime = dwGetOffsetValue(cp, 227);
Appr1 = wGetOffsetValue(cp, 231);
Appr2 = wGetOffsetValue(cp, 235);
Appr3 = wGetOffsetValue(cp, 239);
Appr4 = wGetOffsetValue(cp, 243);
ApprColor = dwGetOffsetValue(cp, 247);
elo = wGetOffsetValue(cp, 251);
TotalEK = dwGetOffsetValue(cp, 253);
ZeroMemory(MagicMastery, sizeof(MagicMastery));
SafeCopy(MagicMastery, cp+charIndexEnd, 100);
string skillQuery;
skillQuery.append("UPDATE `skill` SET `SkillMastery` = CASE SkillID ");
for (w = 0; w < 24; w++)
{
SkillMastery = bGetOffsetValue(cp, charIndexEnd+100+w);
sprintf(QueryConsult, "WHEN %u THEN %u ", w, SkillMastery);
skillQuery.append(QueryConsult);
}
skillQuery.append("END,");

skillQuery.append("`SkillSSN` = CASE SkillID ");
for (w = 0; w < 24; w++)
{
SkillSSN = dwGetOffsetValue(cp, charIndexEnd+124+(w*4));
sprintf(QueryConsult, "WHEN %u THEN %u ", w, SkillSSN);
skillQuery.append(QueryConsult);
}
skillQuery.append("END ");
sprintf(QueryConsult, "WHERE `CharID` = '%lu' LIMIT 24;", CharID);
skillQuery.append(QueryConsult);
if(ProcessQuery(&myConn, (char*)skillQuery.c_str()) == -1) return;
pQueryResult = mysql_store_result(&myConn);
SAFEFREERESULT(pQueryResult);
NItems = bGetOffsetValue(cp, charIndexEnd+224);
CurItemID = (GetLastInsertedItemID(myConn)+1);
DeleteAllItemsFromChar(CharID, myConn, bIsBankModified);
ItemInfo = new cItem;
if(NItems > 0)
{
itemQuery.append("INSERT INTO `item` ( `CharID` , `ItemName`, `Count` , `ItemType`, `ID1`, `ID2`, `ID3`, `Color`, \
`Effect1`, `Effect2`, `Effect3`, `LifeSpan`, `Attribute`, `Socket1`, `Socket2`, `Socket3`, `ItemEquip`, \
`ItemPosX`, `ItemPosY`, `ItemID`, `ItemPos`) VALUES");
for(w = 0; w < NItems; w++)
{
IndexForItem = (WORD)(charIndexEnd+225 + (w*67));
ZeroMemory(ItemInfo->ItemName, sizeof(ItemInfo->ItemName));
SafeCopy(ItemInfo->ItemName, cp+IndexForItem, 20);
if(strlen(ItemInfo->ItemName) == 0) continue;
ItemInfo->ItemCount = dwGetOffsetValue(cp, (IndexForItem+20));
ItemInfo->TouchEffectType = (sWORD)wGetOffsetValue(cp, (IndexForItem+24));
ItemInfo->TouchEffectValue1 = (sWORD)wGetOffsetValue(cp, (IndexForItem+26));
ItemInfo->TouchEffectValue2 = (sWORD)wGetOffsetValue(cp, (IndexForItem+30));
ItemInfo->TouchEffectValue3 = (sWORD)dwGetOffsetValue(cp, (IndexForItem+34));
ItemInfo->ItemColor = bGetOffsetValue(cp, (IndexForItem+38));
ItemInfo->ItemSpecEffectValue1 = (sWORD)wGetOffsetValue(cp, (IndexForItem+39));
ItemInfo->ItemSpecEffectValue2 = (sWORD)wGetOffsetValue(cp, (IndexForItem+41));
ItemInfo->ItemSpecEffectValue3 = (sWORD)wGetOffsetValue(cp, (IndexForItem+43));
ItemInfo->CurLifeSpan = wGetOffsetValue(cp, (IndexForItem+45));
ItemInfo->Attribute = dwGetOffsetValue(cp, (IndexForItem+47));
ItemInfo->socket1 = bGetOffsetValue(cp, (IndexForItem+51));
ItemInfo->socket2 = bGetOffsetValue(cp, (IndexForItem+52));
ItemInfo->socket3 = bGetOffsetValue(cp, (IndexForItem+53));
ItemInfo->IsItemEquipped = (BOOL)bGetOffsetValue(cp, (IndexForItem+54));
ItemInfo->ItemPosX = (sWORD)wGetOffsetValue(cp, (IndexForItem+55));
ItemInfo->ItemPosY = (sWORD)wGetOffsetValue(cp, (IndexForItem+57));
ItemInfo->ItemUniqueID = ullGetOffsetValue(cp, (IndexForItem+59));
if(ItemInfo->ItemUniqueID == 0){
ItemInfo->ItemUniqueID = CurItemID;
CurItemID++;
}
//ItemInfo->DupItemCode = CheckDupItem(ItemInfo, myConn, FALSE);
ItemInfo->PutItemInBank = FALSE;
if(w) itemQuery.append(",");
sprintf(QueryConsult, "(%lu,'%s',%lu,%d,%d,%d,%d,%d,%d,%d,%d,%u,%lu,",
CharID ,ItemInfo->ItemName,ItemInfo->ItemCount, ItemInfo->TouchEffectType, ItemInfo->TouchEffectValue1, ItemInfo->TouchEffectValue2, ItemInfo->TouchEffectValue3, ItemInfo->ItemColor, ItemInfo->ItemSpecEffectValue1, ItemInfo->ItemSpecEffectValue2, ItemInfo->ItemSpecEffectValue3, ItemInfo->CurLifeSpan, ItemInfo->Attribute);
itemQuery.append(QueryConsult);

if(ItemInfo->socket1 != SG_NONE)
sprintf(QueryConsult, "%u,", ItemInfo->socket1);
else
sprintf(QueryConsult, "NULL,", ItemInfo->socket1);
itemQuery.append(QueryConsult);
if(ItemInfo->socket2 != SG_NONE)
sprintf(QueryConsult, "%u,", ItemInfo->socket2);
else
sprintf(QueryConsult, "NULL,", ItemInfo->socket2);
itemQuery.append(QueryConsult);
if(ItemInfo->socket3 != SG_NONE)
sprintf(QueryConsult, "%u,", ItemInfo->socket3);
else
sprintf(QueryConsult, "NULL,", ItemInfo->socket3);
itemQuery.append(QueryConsult);
sprintf(QueryConsult, "%d,%d,%d,%I64u,'BAG')", ItemInfo->IsItemEquipped, ItemInfo->ItemPosX, ItemInfo->ItemPosY, ItemInfo->ItemUniqueID);
itemQuery.append(QueryConsult);
DeleteItemOnDB(ItemInfo, CharID, myConn);
}
itemQuery.append(";");
if(ProcessQuery(&myConn, (char *) itemQuery.c_str()) == -1) return;
pQueryResult = mysql_store_result(&myConn);
SAFEFREERESULT(pQueryResult);
}
Index = (WORD)(charIndexEnd+225+(NItems*67));
NBankItems = bGetOffsetValue(cp, Index);
if(NBankItems > 0){
itemQuery.clear();
itemQuery.append("INSERT INTO `item` ( `CharID` , `ItemName`, `Count` , `ItemType`, `ID1`, `ID2`, `ID3`, \
`Color`, `Effect1`, `Effect2`, `Effect3`, `LifeSpan`, `Attribute`, `Socket1`, `Socket2`, `Socket3`, `ItemID`, `ItemPos`) VALUES ");
for(w = 0; w < NBankItems; w++){
IndexForItem = (WORD)(Index+1+(w*62));
ZeroMemory(ItemInfo->ItemName, sizeof(ItemInfo->ItemName));
SafeCopy(ItemInfo->ItemName, cp+IndexForItem, 20);
if(strlen(ItemInfo->ItemName) == 0) continue;
ItemInfo->ItemCount = dwGetOffsetValue(cp, (IndexForItem+20));
ItemInfo->TouchEffectType = (sWORD)wGetOffsetValue(cp, (IndexForItem+24));
ItemInfo->TouchEffectValue1 = (sWORD)wGetOffsetValue(cp, (IndexForItem+26));
ItemInfo->TouchEffectValue2 = (sWORD)wGetOffsetValue(cp, (IndexForItem+30));
ItemInfo->TouchEffectValue3 = (sWORD)dwGetOffsetValue(cp, (IndexForItem+34));
ItemInfo->ItemColor = bGetOffsetValue(cp, (IndexForItem+38));
ItemInfo->ItemSpecEffectValue1 = (sWORD)wGetOffsetValue(cp, (IndexForItem+39));
ItemInfo->ItemSpecEffectValue2 = (sWORD)wGetOffsetValue(cp, (IndexForItem+41));
ItemInfo->ItemSpecEffectValue3 = (sWORD)wGetOffsetValue(cp, (IndexForItem+43));
ItemInfo->CurLifeSpan = wGetOffsetValue(cp, (IndexForItem+45));
ItemInfo->Attribute = dwGetOffsetValue(cp, (IndexForItem+47));
ItemInfo->socket1 = bGetOffsetValue(cp, (IndexForItem+51));
ItemInfo->socket2 = bGetOffsetValue(cp, (IndexForItem+52));
ItemInfo->socket3 = bGetOffsetValue(cp, (IndexForItem+53));
ItemInfo->ItemUniqueID = ullGetOffsetValue(cp, (IndexForItem+54));
if(ItemInfo->ItemUniqueID == 0){
ItemInfo->ItemUniqueID = CurItemID;
CurItemID++;
}
//ItemInfo->DupItemCode = CheckDupItem(ItemInfo, myConn, TRUE);
ItemInfo->PutItemInBank = TRUE;
if(w) itemQuery.append(",");
sprintf(QueryConsult, "(%lu,'%s',%lu,%d,%d,%d,%d,%d,%d,%d,%d,%u,%lu,",
CharID ,ItemInfo->ItemName,ItemInfo->ItemCount, ItemInfo->TouchEffectType, ItemInfo->TouchEffectValue1, ItemInfo->TouchEffectValue2, ItemInfo->TouchEffectValue3, ItemInfo->ItemColor, ItemInfo->ItemSpecEffectValue1, ItemInfo->ItemSpecEffectValue2, ItemInfo->ItemSpecEffectValue3, ItemInfo->CurLifeSpan, ItemInfo->Attribute);
itemQuery.append(QueryConsult);

if(ItemInfo->socket1 != SG_NONE)
sprintf(QueryConsult, "%u,", ItemInfo->socket1);
else
sprintf(QueryConsult, "NULL,", ItemInfo->socket1);
itemQuery.append(QueryConsult);
if(ItemInfo->socket2 != SG_NONE)
sprintf(QueryConsult, "%u,", ItemInfo->socket2);
else
sprintf(QueryConsult, "NULL,", ItemInfo->socket2);
itemQuery.append(QueryConsult);
if(ItemInfo->socket3 != SG_NONE)
sprintf(QueryConsult, "%u,", ItemInfo->socket3);
else
sprintf(QueryConsult, "NULL,", ItemInfo->socket3);
itemQuery.append(QueryConsult);
sprintf(QueryConsult, "%I64u, 'WH')", ItemInfo->ItemUniqueID);
itemQuery.append(QueryConsult);
DeleteItemOnDB(ItemInfo, CharID, myConn);
}
itemQuery.append(";");
if(ProcessQuery(&myConn, (char *) itemQuery.c_str()) == -1) return;
pQueryResult = mysql_store_result(&myConn);
SAFEFREERESULT(pQueryResult);
}
SAFEDELETE(ItemInfo);
Index += ((NBankItems*62)+1);
ZeroMemory(Profile, sizeof(Profile));
SafeCopy(Profile, (cp+Index), strlen(cp+Index));
ZeroMemory(QueryConsult, sizeof(QueryConsult));
ZeroMemory(GoodGuildName, sizeof(GoodGuildName));
MakeGoodName(GoodGuildName, GuildName);
ZeroMemory(GoodProfile, sizeof(GoodProfile));
MakeGoodName(GoodProfile, Profile);
sprintf(QueryConsult, "UPDATE `char_database` SET `LastSaveDate` = '%s',`ID1` = '%d',`ID2` = '%d',`ID3` = '%d',`Level` = '%d',`Strenght` = '%d',`Vitality` = '%d',`Dexterity` = '%d',`Intelligence` = '%d',`Magic` = '%d',`Agility` = '%d',`Luck` = '%d',`Exp` = '%lu',`Gender` = '%d',`Skin` = '%d',`HairStyle` = '%d',`HairColor` = '%d',`Underwear` = '%d',`ApprColor` = '%lu',`Appr1` = '%lu',`Appr2` = '%lu',`Appr3` = '%lu',`Appr4` = '%lu',`Nation` = '%s',`MapLoc` = '%s',`LocX` = '%d',`LocY` = '%d',`Profile` = '%s',`Contribution` = '%lu',`LeftSpecTime` = '%lu',`LockMapName` = '%s',`LockMapTime` = '%lu',`BlockDate` = '%s',`GuildName` = '%s',`GuildID` = '%d',`GuildRank` = '%d',`FightNum` = '%d',`FightDate` = '%lu',`FightTicket` = '%d',`QuestNum` = '%u',`QuestID` = '%u',`QuestCount` = '%u',`QuestRewType` = '%d',`QuestRewAmmount` = '%lu',\
`QuestCompleted` = '%d',`EventID` = '%lu',`WarCon` = '%lu',`CruJob` = '%d',`CruID` = '%lu',`CruConstructPoint` = '%lu', `Popularity` = '%li' ,`HP` = '%lu',`MP` = '%lu',`SP` = '%lu',`EK` = '%lu',`PK` = '%lu',`RewardGold` = '%lu',`DownSkillID` = '%d',`Hunger` = '%d',`LeftSAC` = '%u',`LeftShutupTime` = '%lu',`LeftPopTime` = '%lu',`LeftForceRecallTime` = '%lu',`LeftFirmStaminarTime` = '%lu',`LeftDeadPenaltyTime` = '%lu',`MagicMastery` = '%s',`PartyID` = '%lu',`GizonItemUpgradeLeft` = '%lu',`elo` = '%lu',`TotalEK` = '%lu' WHERE `CharID` = '%lu' LIMIT 1;",
SaveDate, CharID1, CharID2, CharID3, Level, STR, VIT, DEX, INT, MAG, AGI, Luck, Exp, Sex, Skin, HairStyle, HairColor, Underwear, ApprColor, Appr1, Appr2, Appr3, Appr4, Location, MapName, MapLocX, MapLocY, GoodProfile, Contribution, SpecialAbilityTime, LockedMapName, LockedMapTime, BlockDate, GoodGuildName, GuildID, GuildRank, FightzoneNumber, ReserveTime, FightzoneTicketNumber, Quest, QuestID, CurQuestCount, QuestRewardType, QuestRewardAmmount, IsQuestCompleted, SpecialEventID, WarContribution, CrusadeDuty, CrusadeGUID, ConstructionPoint, Rating, HP, MP, SP, EK, PK, RewardGold, DownSkillIndex, HungerStatus, SuperAttackLeft, TimeLeftShutUp, TimeLeftRating, TimeLeftForceRecall, TimeLeftFirmStaminar, DeadPenaltyTime, MagicMastery, PartyID, Gizon, elo, TotalEK, CharID);
//PutLogFileList(QueryConsult, "Logs/SaveCharQuery.txt");
if(ProcessQuery(&myConn, QueryConsult) == -1) return;
pQueryResult = mysql_store_result(&myConn);
SAFEFREERESULT(pQueryResult);
//char cTxt[50];
//sprintf(cTxt, "save bench: %u", timeGetTime() - bench);
//PutLogList(cTxt, WARN_MSG);
}

In Topic: Helbreath SQL (Help needed)

09 October 2012 - 08:01 AM

Yea i changed the info in the table to SmallInt.
1 exe sends to another exe that sends it to database.

Game server sends:
player->SetStr( bGetOffsetValue(pData, 46), false );
player->m_iVit = bGetOffsetValue(pData, 47);
player->SetDex( bGetOffsetValue(pData, 48) );
player->SetInt( bGetOffsetValue(pData, 49), false );
player->SetMag( bGetOffsetValue(pData, 50) );
player->m_iCharisma = bGetOffsetValue(pData, 51);

to Login Server that uses this:

else if(IsSame(field[f]->name, "Strenght")) PutOffsetValue(Data, 47, BYTESIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Vitality")) PutOffsetValue(Data, 48, BYTESIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Dexterity")) PutOffsetValue(Data, 49, BYTESIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Intelligence")) PutOffsetValue(Data, 50, BYTESIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Magic")) PutOffsetValue(Data, 51, BYTESIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Agility")) PutOffsetValue(Data, 52, BYTESIZE, atoi(myRow[f]));

Its are more places it sends but thats how it works..

BYTESIZE = 1 = TinyInt
WORDSIZE = 2 = SmallInt

and i changed this to WORDSIZE
else if(IsSame(field[f]->name, "Strenght")) PutOffsetValue(Data, 47, WORDSIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Vitality")) PutOffsetValue(Data, 49, WORDSIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Dexterity")) PutOffsetValue(Data, 51, WORDSIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Intelligence")) PutOffsetValue(Data, 53, WORDSIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Magic")) PutOffsetValue(Data, 55, WORDSIZE, atoi(myRow[f]));
else if(IsSame(field[f]->name, "Agility")) PutOffsetValue(Data, 57, WORDSIZE, atoi(myRow[f]));

So it goes up from 47 to 49 and so on.. cause thats right when WORDSIZE takes 2 slots insted of 1 like BYTESIZE.

And this is only a part of the code..
There are a couple of 100 lines that are linked to this part.

Thanks,
xRisenx

PARTNERS