[HELP] MySQL
#1

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 ================
Reply
#2

pawn Код:
mysql_function_query(connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:... );
These are the parameters so you miss 3 arguments.
Reply
#3

And maybe someone could say, what I must write in those arguments?
Reply
#4

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
pawn Код:
mysql_query(query);
Reply
#5

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
pawn Код:
mysql_query(query);
Lol mysql_query function was removed since R7 lol
It won't work anymore.
Try tquery and pquery instead...
Reply
#6

Can someone help me, what I need to write in these 3 arguments?:
Код:
bool:cache, callback[], format[]
Reply
#7

Bump pls
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)