SA-MP Forums Archive
[Tutorial] Updating BlueG's MySQL plugin R33+ scripts to R40 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Updating BlueG's MySQL plugin R33+ scripts to R40 (/showthread.php?tid=616103)

Pages: 1 2 3


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Spmn - 09.09.2016

Quote:
Originally Posted by eco1999
View Post
Integer is wrong;

cache_get_value_name(0, "string", dest);
new value = cache_get_value_name(0, "integer");

New;

new value;
cache_get_value_name_int(0, "integer", value);
You didn't pay attention to the entire tutorial:
Quote:

all cache_get_ functions now return their value through a reference parameter instead of returning it directly:

However, I must admit that the first post is a bit ambiguous.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Slawiii - 16.09.2016

Quote:
Originally Posted by eco1999
View Post
Integer is wrong;

cache_get_value_name(0, "string", dest);
new value = cache_get_value_name(0, "integer");

New;

new value;
cache_get_value_name_int(0, "integer", value);
yes its the correct code

or like

PHP Code:

new value;
cache_get_value_int(0"integer"value); 



Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Kathleen - 21.09.2016

Is it just me, or i have to update a thousand lines now and create over thousand variables just to make R40+ work.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - saffierr - 09.12.2016

It's certainly not just you, I mean; this is harder than I thought it'd be, I do not comprehend somethings whilst I'm literally doing the same as described in the tutorial. Unless someone can help and/or convince me not to downgrade again to R39, I'm going to do it.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Konstantinos - 09.12.2016

Quote:
Originally Posted by Kathleen
View Post
Is it just me, or i have to update a thousand lines now and create over thousand variables just to make R40+ work.
That's why he provided regex examples so it will be easier. I converted each line myself manually and it only took a couple of minutes (literally 5 minutes for 10k lines and many mysql functions being called).

Quote:
Originally Posted by saffierr
View Post
It's certainly not just you, I mean; this is harder than I thought it'd be, I do not comprehend somethings whilst I'm literally doing the same as described in the tutorial. Unless someone can help and/or convince me not to downgrade again to R39, I'm going to do it.
I'm not sure if the log system in R39-6 which now prints the query, it still does that for warnings. You can easily find the exact line (debug info) in R40+ and it supports multiple-statements which I like a lot. I'd still prefer to be up-to-date to my plugins and be ready for new features as well.


About the "over thousands variables", it's not like you cannot create a function similar to cache_num_rows and keep it the same style:
pawn Code:
cache_get_row_int(row_idx, column_idx)
{
    new retrieved_number;
    cache_get_value_index_int(row_idx, column_idx, retrieved_number);
    return retrieved_number;
}



Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - AroseKhanNiazi - 10.12.2016

So this? http://forum.sa-mp.com/showthread.ph...30#post3811730

In previous versions there was mysql_static.so which did that work but now? xD?


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - PapaSmerf - 19.12.2016

Well, when i'm trying to include a_mysql_yinline i have this error:

Code:
fatal error 111: user error: You have to include the y_inline include before this one!
#include <YSI\y_inline>
#include <a_mysql_yinline>


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Konstantinos - 19.12.2016

Quote:
Originally Posted by PapaSmerf
View Post
Well, when i'm trying to include a_mysql_yinline i have this error:

Code:
fatal error 111: user error: You have to include the y_inline include before this one!
#include <YSI\y_inline>
#include <a_mysql_yinline>
https://github.com/maddinat0r/samp-m...nclude#example


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - PapaSmerf - 19.12.2016

Yes, i have that one. I updated YSI to 4.0 but now my compiler crashes.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Konstantinos - 19.12.2016

Can you create a new file and try to compile the example given so we can be sure whether the problems comes from your code or not? I actually downloaded YSI and it compiled so your code is most likely the problem.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Tenka - 20.12.2016

http://pastebin.com/jJ31Jr6D

Everyone can login with blah blah password

How can i fix this please?

Sorry for my english.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - PapaSmerf - 20.12.2016

Quote:
Originally Posted by Konstantinos
View Post
Can you create a new file and try to compile the example given so we can be sure whether the problems comes from your code or not? I actually downloaded YSI and it compiled so your code is most likely the problem.
Uhh, i did it but still not working. Look at the screen http://i.imgur.com/WrRpEG1.png.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Eloy - 22.12.2016

Quote:
Originally Posted by PapaSmerf
View Post
Uhh, i did it but still not working. Look at the screen http://i.imgur.com/WrRpEG1.png.
You have all archives to activate plugins mysql and called plugin in server.cfg?


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Konstantinos - 22.12.2016

Quote:
Originally Posted by Eloy
View Post
You have all archives to activate plugins mysql and called plugin in server.cfg?
The problem was related to compiling and its cause is still unknown. However, using Zeex's compile patch fixes it.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Lordzy - 04.01.2017

Quote:
Originally Posted by maddinat0r
View Post
becomes
Code:
cache_get_value_index(0, 0, dest);
new value = cache_get_value_index_int(0, 1);
Simply search-and-replace it.
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);



Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Loinal - 07.01.2017

mysql_store_result(mysql);

Becomes what>?


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - t9ndep - 21.01.2017


I do not understand what this is, how to replace? can someone help me?
+1 Rep


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - X337 - 21.01.2017

You need to use another script editor like Sublime text, notepad++, etc. to find and replace using regex patterns.


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - t9ndep - 22.01.2017

Quote:
Originally Posted by X337
View Post
You need to use another script editor like Sublime text, notepad++, etc. to find and replace using regex patterns.
Ohh thank.. I have

how to fix it

mysql_free_result do not support on mysql r40


Re: Updating BlueG's MySQL plugin R33+ scripts to R40 - Cypress - 27.01.2017

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.