SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 27/01/2017, 02:02 PM   #41
Lordzy
High-roller
 
Lordzy's Avatar
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,703
Reputation: 1176
Default Re: Updating BlueG's MySQL plugin R33+ scripts to R40

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);
__________________
Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Old 28/01/2017, 02:46 PM   #42
maddinat0r
Banned
 
Join Date: Jun 2010
Location: Germany
Posts: 845
Reputation: 482
Default Re: Updating BlueG's MySQL plugin R33+ scripts to R40

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.
maddinat0r is offline   Reply With Quote
Old 08/10/2017, 01:06 PM   #43
Kruno88
Huge Clucker
 
Kruno88's Avatar
 
Join Date: Apr 2014
Posts: 343
Reputation: 56
Default Re: Updating BlueG's MySQL plugin R33+ scripts to R40

Quote:
undefined symbol "dest"
Any help
Kruno88 is offline   Reply With Quote
Old 19/10/2018, 06:14 PM   #44
StRaffael
Little Clucker
 
Join Date: Jan 2016
Posts: 15
Reputation: 0
Default Re: Updating BlueG's MySQL plugin R33+ scripts to R40

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..?
StRaffael is offline   Reply With Quote
Old 23/10/2018, 08:28 PM   #45
KinderClans
Banned
 
Join Date: May 2018
Location: Italy
Posts: 719
Reputation: 43
Default Re: Updating BlueG's MySQL plugin R33+ scripts to R40

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.
KinderClans is offline   Reply With Quote
Old 30/09/2019, 04:20 PM   #46
3L4D
Little Clucker
 
Join Date: Sep 2019
Posts: 3
Reputation: 0
Default Re: Updating BlueG's MySQL plugin R33+ scripts to R40

Thanks!
3L4D is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating BlueG's mysql causes deleted functions to return problems Partner Scripting Help 0 01/11/2014 10:31 PM
[MySQL] From StickenKid's plugin to BlueG's plugin jessejanssen Scripting Help 2 15/06/2014 02:20 AM
Trouble updating with BlueG's mysql R7 2KY Scripting Help 3 25/12/2013 04:46 AM
BlueG MySQL plugin - Failed (plugins/mysql.so: undefined symbol: _Z13stringvprintfPKcPc) linuxthefish Plugin Development 10 13/07/2013 11:56 AM


All times are GMT. The time now is 10:34 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.