#define UPDATE_PROPINFO_SQL "UPDATE" user_prop_table "SET" player_props "= '%s ' WHERE id =%d;"
#define DEFAULT_PLAYER_ID 1
The following method has always reported grammatical errors, making people very mad.
int Player::updatepropinfo ()
{
char* sql = sqlite3_mprintf (Update_propinfo_sql,getpropstimestr (). C_STR (), default_player_id);
string retstr = SQL;
Sqlite3_free (SQL);
return gsqlite3->exec (SQL, RETSTR);
}
String Player::getpropstimestr ()
{
String propstimestr = "";
for (int i = 0; i < m_propstimes.size (); i++)
{
Char temp[64] = {0};
sprintf (temp, "%d", m_propstimes[i]);
Propstimestr.append (temp);
if (I < (M_propstimes.size ()-1))
{
Propstimestr.append (","); TIP: This space cannot be saved
}
}
Propstimestr.append ("");
return propstimestr;
}
Vector<int> M_propstimes; An array of the number of props stacked
Finally found in the top of the Propstimestr.append (","); the space in front of the comma is not written, the space pits the dead.
Issues encountered by SQLite