Uhh need help with msql r34.. Got querty..
#1

Hello dear samp members again I post the error what I have..

Maybe someone could help me..
pawn Код:
error 035: argument type mismatch (argument 1)
pawn Код:
format(var,100,"UPDATE `vehicles` SET `CarID`='%d' WHERE `CarID`='%d'",vInfo[vehicleid][vCariD],vInfo[vehicleid][vCariD]);
mysql_query(var);//this line.
Thank you for your time.

With best regards Scrillex.
Reply
#2

The format thing is wrong.
https://sampwiki.blast.hk/wiki/Format
Reply
#3

I don't understand what is wrong with it... %d is correct.. isn't it?

and I got
pawn Код:
(output[], len, const format[], {Float,_}:...)
 format(var,100,"UPDATE `vehicles` SET `CarID`='%d' WHERE `CarID`='%d'",vInfo[vehicleid][vCariD],vInfo[vehicleid][vCariD]);
var = output
100 = len
UPDATE = format
and all the rest
Reply
#4

Ah, I got it.
The correct native for mysql_query is:
pawn Код:
native mysql_query(conhandle, query[]);
pawn Код:
new var[100];
format(var, sizeof(var), "UPDATE `vehicles` SET `CarID`='%d' WHERE `CarID`='%d'", vInfo[vehicleid][vCariD], vInfo[vehicleid][vCariD]);
mysql_query(dbHandle, var); // Your connection handle variable will come here.
Reply
#5

Okay downgraded it to r5 and it worked.. but now I have anther problem


pawn Код:
[12:37:54] [debug] AMX backtrace:
[12:37:54] [debug] #0 native mysql_fetch_field_row () [012165e0] from mysql.DLL
[12:37:54] [debug] #1 00281740 in ?? () from IMGRP.amx
[12:37:54] [debug] #2 000c0090 in public Audio_OnGameModeInit () from IMGRP.amx
[12:37:54] [debug] #3 native CallLocalFunction () [00471ef0] from samp-server.exe
[12:37:54] [debug] #4 000135c8 in ?? () from IMGRP.amx
[12:37:54] [debug] #5 0000d770 in public ab_OnGameModeInit () from IMGRP.amx
[12:37:54] [debug] #6 native CallLocalFunction () [00471ef0] from samp-server.exe
[12:37:54] [debug] #7 0000c1cc in public OnGameModeInit () from IMGRP.amx
[12:37:54] [debug] System backtrace:
[12:37:55] [debug] #0 012190b4 in ?? () from plugins\mysql.DLL
[12:37:55] [debug] #1 012166b3 in ?? () from plugins\mysql.DLL
[12:37:55] [debug] #2 004010b6 in ?? () from samp-server.exe
[12:37:55] [debug] #3 705539e2 in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #4 70555e26 in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #5 7054bf3f in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #6 70553a0e in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #7 004721fe in ?? () from samp-server.exe
[12:37:55] [debug] #8 004010b6 in ?? () from samp-server.exe
[12:37:55] [debug] #9 705539e2 in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #10 70555e26 in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #11 7054bf3f in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #12 70553a0e in ?? () from plugins\crashdetect.DLL
[12:37:55] [debug] #13 004721fe in ?? () from samp-server.exe
[12:37:55] [debug] #14 004010b6 in ?? () from samp-server.exe
[12:37:55] [debug] #15 705539e2 in ?? () from \plugins\crashdetect.DLL
[12:37:55] [debug] #16 70555e26 in ?? () from \plugins\crashdetect.DLL
[12:37:55] [debug] #17 7054bf3f in ?? () from \plugins\crashdetect.DLL
[12:37:55] [debug] #18 70553a0e in ?? () from \plugins\crashdetect.DLL
[12:37:55] [debug] #19 0046e1f4 in ?? () from \samp-server.exe
[12:37:55] [debug] #20 65646f6d in ?? () from \samp-server.exe
[12:37:55] [debug] #21 6d692f73 in ?? () from \samp-server.exe
[12:37:55] [debug] #22 2e707267 in ?? () from samp-server.exe
[12:37:55] [debug] #23 00786d61 in ?? ()
Reply
#6

Downgrading is not a good thing. Compile with -d3 flag to get line which causes the crash
Reply
#7

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Downgrading is not a good thing. Compile with -d3 flag to get line which causes the crash
Do that, if you do not know how to make it, follow these steps below.

pawn Код:
1st - Open your pawno folder.
2nd - Open Notepad++ or notepad, and save the file as pawn.cfg
3rd - Open that file and add -d3
4th - Save it and compile, then test your gamemode and show us the error
Reply
#8

Yeah but still I got the same errors.. and Can't get rid of mysql_query error..
I'm new in mysql and it is something new.. for me..

Done that.. thank you for guide.
Reply
#9

Use R6 which is the last version for un-threaded queries. And is your crashdetect plugin is up-to-date? The last version is 4.12.
Reply
#10

Got it. ... And okay I will update to r6.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)