Hi! Why dosent this work?? It should save.. But it dosent. when I relog it get removed..
pawn Код:
new var[32];
for (new i = 1; i < 11; i++)
{
format(var, sizeof(var), "`clothBone%d` = '%d', ", i);
formatcat(query, var, ClothingInfo[playerid][clothBone][i]);
format(var, sizeof(var), "`clothSlot%d` = '%d', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot][i]);
format(var, sizeof(var), "`clothSlot%d_X` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_X][i]);
format(var, sizeof(var), "`clothSlot%d_Y` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_Y][i]);
format(var, sizeof(var), "`clothSlot%d_Z` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_Z][i]);
format(var, sizeof(var), "`clothSlot%d_RX` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_RX][i]);
format(var, sizeof(var), "`clothSlot%d_RY` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_RY][i]);
format(var, sizeof(var), "`clothSlot%d_RZ` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_RZ][i]);
format(var, sizeof(var), "`clothSlot%d_SX` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_SX][i]);
format(var, sizeof(var), "`clothSlot%d_SY` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_SY][i]);
format(var, sizeof(var), "`clothSlot%d_SZ` = '%f', ", i);
formatcat(query, var, ClothingInfo[playerid][clothSlot_SZ][i]);
format(var, sizeof(var), "`clothingName%d` = '%s', ", i);
formatcat(query, var, ClothingName[playerid][i]);
}
If you feel the need to append numbers to field names then your table structure is a mess. Use less columns and more rows. For your sake I hope that this isn't the main player table either. You should be looking at a structure like:
print that whole string after formating and post it here, I think you are missing commas (,) after each column.