ich habe Folgendes Problem wenn ich einen string aus der mysql datenbank lesen will hab ich immer diesen error
J:\samp03e_svr_R2_win32\THF\Selfmade\Roleplay\THF.pwn(818) : error 047: array sizes do not match, or destination array is too small
J:\samp03e_svr_R2_win32\THF\Selfmade\Roleplay\THF.pwn(819) : error 047: array sizes do not match, or destination array is too small
J:\samp03e_svr_R2_win32\THF\Selfmade\Roleplay\THF.pwn(820) : error 047: array sizes do not match, or destination array is too small
J:\samp03e_svr_R2_win32\THF\Selfmade\Roleplay\THF.pwn(821) : error 047: array sizes do not match, or destination array is too small
der enum
enum PBanned
{
pBanned,
pGrund[256],
pAdmin[256],
pStunde,
pMinute,
pSekunde,
pJahr,
pmonat,
ptag,
bDatum[256],
bUhrzeit[256]
};
new binfo[MAX_PLAYERS][PBanned];
der code
binfo[playerid][pBanned] = mysql_GetInt("bans", "Banned","Name", SpielerInfo[playerid][pName]);
binfo[playerid][pGrund] = mysql_GetString("bans","Grund","Name",SpielerInfo[playerid][pName]);
binfo[playerid][pAdmin] = mysql_GetString("bans","Admin","Name",SpielerInfo[playerid][pName]);
binfo[playerid][bDatum] = mysql_GetString("bans","Datum","Name",SpielerInfo[playerid][pName]);
binfo[playerid][bUhrzeit] = mysql_GetString("bans","Uhrzeit","Name",SpielerInfo[playerid][pName]);
if(binfo[playerid][pBanned]== 1)
{
new Bandstr[128];
format(Bandstr,sizeof(Bandstr),"Du wurdes von %s am %s um %s Gebannt\n Grund: %s",binfo[playerid][pAdmin],binfo[playerid][bDatum],binfo[playerid][bUhrzeit],binfo[playerid][pGrund]);
Kick(playerid);
}
}
der stock
stock mysql_GetString(Table[], Field[], Where[], Is[])
{
new query[128], Get[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Is, Is);
format(query, 128, "SELECT `%s` FROM `%s` WHERE `%s` = '%s'", Field, Table, Where, Is);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(Get);
mysql_free_result();
return Get;
}