[Tutorial] Updating BlueG's MySQL plugin R33+ scripts to R40
#41

Quote:
Originally Posted by Cypress
View Post
How would I change this without getting any warning?

pawn Code:
// before
if ( gangid == cache_get_row_int( i, 0 ) ) {
//..
}

//after
if ( gangid == cache_get_value_index_int( i, 0 ) ) {
//..
}

warning 202: number of arguments does not match definition
Haven't had time to play with it yet just started upgrading my server after a whole year.
Seems like maddinat0r haven't yet updated what I've posted. Click on my quote message to redirect to the post containing the usage code.

Quote:
Originally Posted by Lordzy
View Post
You made a mistake here. Simply searching and replacing wouldn't help since cache_get_value_index_int stores the retrieved value in it's third argument.
pawn Code:
native cache_get_value_index_int(row_idx, column_idx, &destination);
native cache_get_value_index_float(row_idx, column_idx, &Float:destination);
Reply
#42

Quote:
Originally Posted by Lordzy
View Post
You made a mistake here. Simply searching and replacing wouldn't help since cache_get_value_index_int stores the retrieved value in it's third argument.
pawn Code:
native cache_get_value_index_int(row_idx, column_idx, &destination);
native cache_get_value_index_float(row_idx, column_idx, &Float:destination);
Sorry for the late reply.
I've done this on purpose. I tried to design this tutorial as a step-by-step guide on converting scripts. That's only one step of many. The next step after that one is to fix the return values. Otherwise the regular expressions wouldn't work as intended.
Reply
#43

Quote:

undefined symbol "dest"

Any help
Reply
#44

What about mysql_num_rows, mysql_num_rows, mysql_free_result, mysql_fetch_row, mysql_real_escape_string, mysql_store_result, mysql_fetch_row, mysql_retrieve_row, mysql_fetch_field_row functions and soo on..?
Reply
#45

Quote:
Originally Posted by StRaffael
View Post
What about mysql_num_rows, mysql_num_rows, mysql_free_result, mysql_fetch_row, mysql_real_escape_string, mysql_store_result, mysql_fetch_row, mysql_retrieve_row, mysql_fetch_field_row functions and soo on..?
mysql_num_rows:

pawn Code:
for(new i, j = cache_num_rows(); i != j; i++)
mysql_free_result:

pawn Code:
new Cache:result = mysql_query(db, query);
cache_delete(result);
I don't remember other functions.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)