02.01.2018, 21:15
(
Последний раз редактировалось Lirbo; 03.01.2018 в 01:07.
)
Edit: this is the part that causing this
========================================
PHP код:
new rows, fields, fixer[MAX_ITEMS][ItemInfo], getstr[32];
PHP код:
fixer[MAX_ITEMS][ItemInfo]
PHP код:
forward LoadItems();
enum ItemInfo
{
ID,
RequiredLevel,
Name[32],
Type,
Attack,
MaxHP,
MaxMP,
HPRegeneration,
MPRegeneration,
Jump,
Speed,
Slots,
Object
}
new ItemDB[MAX_ITEMS][ItemInfo];
mysql_tquery(sql, "SELECT * FROM `server_item`", "LoadItems");
public LoadItems()
{
new rows, fields, fixer[MAX_ITEMS][ItemInfo], getstr[32];
cache_get_data(rows, fields);
if(rows)
{
for(new i = 0; i < rows; i++)
{
fixer[i][ID] = cache_get_field_content_int(i, "id");
fixer[i][RequiredLevel] = cache_get_field_content_int(i, "required_level");
cache_get_field_content(i, "name", getstr);
format(fixer[i][Name], 32, getstr);
fixer[i][Type] = cache_get_field_content_int(i, "type");
fixer[i][Attack] = cache_get_field_content_int(i, "attack");
fixer[i][MaxHP] = cache_get_field_content_int(i, "maxhp");
fixer[i][MaxMP] = cache_get_field_content_int(i, "maxmp");
fixer[i][HPRegeneration] = cache_get_field_content_int(i, "hp_regeneration");
fixer[i][MPRegeneration] = cache_get_field_content_int(i, "mp_regeneration");
fixer[i][Jump] = cache_get_field_content_int(i, "jump");
fixer[i][Speed] = cache_get_field_content_int(i, "speed");
fixer[i][Slots] = cache_get_field_content_int(i, "slots");
fixer[i][Object] = cache_get_field_content_int(i, "object");
}
for(new i=0;i<rows;i++)
{
ItemDB[fixer[i][ID]][ID] = fixer[i][ID];
ItemDB[fixer[i][ID]][RequiredLevel] = fixer[i][RequiredLevel];
ItemDB[fixer[i][ID]][Type] = fixer[i][Type];
ItemDB[fixer[i][ID]][Attack] = fixer[i][Attack];
ItemDB[fixer[i][ID]][MaxHP] = fixer[i][MaxHP];
ItemDB[fixer[i][ID]][MaxMP] = fixer[i][MaxMP];
ItemDB[fixer[i][ID]][HPRegeneration] = fixer[i][HPRegeneration];
ItemDB[fixer[i][ID]][MPRegeneration] = fixer[i][MPRegeneration];
ItemDB[fixer[i][ID]][Jump] = fixer[i][Jump];
ItemDB[fixer[i][ID]][Speed] = fixer[i][Speed];
ItemDB[fixer[i][ID]][Slots] = fixer[i][Slots];
ItemDB[fixer[i][ID]][Object] = fixer[i][Object];
format(ItemDB[fixer[i][ID]][Name], 32, fixer[i][Name]);
}
}
}
PHP код:
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 3852 bytes
Code size: 86184 bytes
Data size: 6724496 bytes
Stack/heap size: 16384 bytes; estimated max. usage=1474573 cells (5898292 bytes)
Total requirements: 6830916 bytes