We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want to update the millis value that is stored togheter with a user string, I dont understand how I should do this, here is the code I currently use, (The table is called User_Id_Ping.
void Update_User_Ping_Register(String User_To_Update) {
for (TableRow Row_Count : User_Id_Ping.rows()) {
String Current_User_Id = Row_Count.getString("id");
if (Current_User_Id.contains(User_To_Update)) {
User_Id_Ping.setFloat(row, "ID", millis());
//this is where is should update the value
}
}
}
Answers
userIdPing.setFloat(row, "ID", millis());
userIdPing.setFloat(rowCount, "ID", millis());
Thank you and also my bad, the row value was
int row = int(row_Count.toString());
I removed it when cleaning up the code so it would be easier to understand but forgot to change it back.
The reason I made that variable is.. when I use
userIdPing.setFloat(rowCount, "ID", millis());
I get this error
The function "setFloat()" expects parameters like: "setFloat(int, int, float)"
so thats why I tried to convert it into an int. but that means that the problem isnt fixed :(
Rather than use Table::setFloat() method: :-@
https://Processing.org/reference/Table_setFloat_.html
How about instead TableRow::setFloat() method: *-:)
https://Processing.org/reference/TableRow_setFloat_.html
rowCount.setFloat("ID", millis());
@GoToLoop Thank you! I thought I already tried that, but apparently not. :)