[HELP] MySQL - 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)
+--- Thread: [HELP] MySQL (
/showthread.php?tid=525882)
[HELP] MySQL -
Povis - 14.07.2014
Hello, I have a problem with register/login system. I don't know how to properly write this function, and because of that I got a lot of warnings, which I don't want to see in my script.
This is that function, which don't know how to write properly:
Код:
mysql_function_query(sql, query);
Warnings:
Код:
Current directory: C:\Users\Magahaka\Documents\samp03z_svr_R1_win32\gamemodes
Gamemode.pwn(83) : warning 202: number of arguments does not match definition
Gamemode.pwn(149) : warning 213: tag mismatch
Gamemode.pwn(156) : warning 213: tag mismatch
Gamemode.pwn(156) : warning 213: tag mismatch
Gamemode.pwn(171) : warning 202: number of arguments does not match definition
Gamemode.pwn(171) : warning 202: number of arguments does not match definition
Gamemode.pwn(171) : warning 202: number of arguments does not match definition
Gamemode.pwn(195) : warning 202: number of arguments does not match definition
Gamemode.pwn(195) : warning 202: number of arguments does not match definition
Gamemode.pwn(195) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
10 Warnings.
================ READY ================
Re: [HELP] MySQL -
Konstantinos - 14.07.2014
pawn Код:
mysql_function_query(connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:... );
These are the parameters so you miss 3 arguments.
Re: [HELP] MySQL -
Povis - 14.07.2014
And maybe someone could say, what I must write in those arguments?
Re: [HELP] MySQL -
BroZeus - 14.07.2014
from the method that your are using seems like you have to do this
pawn Код:
mysql_function_query(sql, query);
replace this ^ with the follwoing
Re: [HELP] MySQL - Guest4390857394857 - 14.07.2014
Quote:
Originally Posted by BroZeus
from the method that your are using seems like you have to do this
pawn Код:
mysql_function_query(sql, query);
replace this ^ with the follwoing
|
Lol mysql_query function was removed since R7 lol
It won't work anymore.
Try tquery and pquery instead...
Re: [HELP] MySQL -
Povis - 14.07.2014
Can someone help me, what I need to write in these 3 arguments?:
Код:
bool:cache, callback[], format[]
Re: [HELP] MySQL -
Povis - 14.07.2014
Bump pls
Re: [HELP] MySQL -
Konstantinos - 15.07.2014
It depends on the query. If it's INSERT/UPDATE:
pawn Код:
mysql_function_query(sql, query, false, "", "");
if it's SELECT, you need cache and a callback (with or without parameters) so you'll load the data there.
For more information, read AndreT's tutorial about threaded queries:
https://sampforum.blast.hk/showthread.php?tid=337810