03.04.2013, 19:14
Here is the save
So when i like change the motd in game i get this
pawn Код:
public SaveGangs(gangid)
{
IsDatabaseConnected();
new sql[1024];
format(sql, sizeof(sql), "UPDATE gangs SET taken=%d, name='%s', motd='%s', color='%s', leader='%s', members=%d, spawn_x=%f, spawn_y=%f, spawn_z=%f, spawn_angle=%f, spawn_int=%d, mats='%d', drugs=%d, rankname1='%s', rankname2='%s', rankname3='%s', rankname4='%s', rankname5='%s', rankname6='%s', skin1=%d, skin2=%d, skin3=%d, skin4=%d, skin5=%d, skin6=%d WHERE id=%d",
GangInfo[gangid][GangTaken],
GangInfo[gangid][GangName],
GangInfo[gangid][GangMOTD],
GangInfo[gangid][GangColor],
GangInfo[gangid][GangLeader],
GangInfo[gangid][GangSpawn][0],
GangInfo[gangid][GangSpawn][1],
GangInfo[gangid][GangSpawn][2],
GangInfo[gangid][GangSpawn][3],
GangInfo[gangid][GangInterior],
GangInfo[gangid][GangMats],
GangInfo[gangid][GangDrugs],
GangInfo[gangid][GangMoney],
GangInfo[gangid][GangRank1],
GangInfo[gangid][GangRank2],
GangInfo[gangid][GangRank3],
GangInfo[gangid][GangRank4],
GangInfo[gangid][GangRank5],
GangInfo[gangid][GangRank6],
GangInfo[gangid][GangSkin1],
GangInfo[gangid][GangSkin2],
GangInfo[gangid][GangSkin3],
GangInfo[gangid][GangSkin4],
GangInfo[gangid][GangSkin5],
GangInfo[gangid][GangSkin6],
gangid );
printf(" SQL: %s",sql);
samp_mysql_query(sql);
//if (DEBUG) SQLLog(sql);
//printf("%s", sql);
}
Код:
[21:36:54] SQL: UPDATE gangs SET taken=0, name='', motd='Hell', color='', leader='', members=0, spawn_x=0.000000, spawn_y=0.000000, spawn_z=0.000000, spawn_angle=0.000000, spawn_int=0, mats='0', drugs=0, rankname1='', rankname2='', rankname3='', rankname4='', rankname5='', rankname6='', skin1=0, skin2=0, skin3=0, skin4=0, skin5=0, skin6=0 WHERE id=0 [21:36:54] Error in mysql_query: Unknown column 'taken' in 'field list'