SA-MP Forums Archive
Need help fixing a couple errors [MySQL, +rep] - 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: Need help fixing a couple errors [MySQL, +rep] (/showthread.php?tid=640746)



Need help fixing a couple errors [MySQL, +rep] - Jing_Chan - 06.09.2017

https://pastebin.com/VCEPYbZd

I'm using MySQL r39-2, need help fixing these issues

Код:
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(48) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(48) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(48) : warning 215: expression has no effect
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(50) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(50) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(50) : warning 215: expression has no effect
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(55) : error 035: argument type mismatch (argument 1)
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(69) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(69) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(69) : error 001: expected token: ";", but found "("
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(69) : warning 215: expression has no effect
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(71) : error 035: argument type mismatch (argument 1)
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(73) : error 017: undefined symbol "mysql_fetch_field"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(77) : error 017: undefined symbol "mysql_fetch_field"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(79) : error 017: undefined symbol "mysql_fetch_field"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(81) : error 017: undefined symbol "mysql_fetch_field"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(83) : error 017: undefined symbol "mysql_fetch_field"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(85) : error 017: undefined symbol "mysql_fetch_field"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(87) : error 017: undefined symbol "mysql_fetch_field"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(101) : error 017: undefined symbol "mysql_init"
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(101) : warning 213: tag mismatch
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(102) : warning 213: tag mismatch
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(131) : warning 215: expression has no effect
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(133) : error 035: argument type mismatch (argument 1)
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(160) : error 035: argument type mismatch (argument 1)
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(372) : warning 224: indeterminate array size in "sizeof" expression (symbol "max_len")
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(376) : error 035: argument type mismatch (argument 1)
C:\Users\James\Desktop\RP Server\gamemodes\rp.pwn(377) : error 017: undefined symbol "mysql_num_rows"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


15 Errors.
will +rep for any guidance etc


Re: Need help fixing a couple errors [MySQL, +rep] - Abagail - 06.09.2017

Here's your problem:
Quote:
Originally Posted by Jing_Chan
Посмотреть сообщение
I'm using MySQL r39-2 [...]
Your script is using an older version of the MySQL plugin that has a completely different structure. You'll need to convert outdated functions to use newer ones found in the plugin. There's a wiki page with information on what functions the plugin offers that you can refer to:
https://sampwiki.blast.hk/wiki/MySQL

Do post code if there's a certain part you need help with.


Re: Need help fixing a couple errors [MySQL, +rep] - 10MIN - 06.09.2017

Update the code to use R33+ natives (from R33 to R39)
PS: Your code seem to use R7+ natives
E: Abagail was faster than me.


Re: Need help fixing a couple errors [MySQL, +rep] - n00blek - 06.09.2017

At lines 83 85 87 it says undefined symbol mysql_idk something
Write new mysql_fetch_field(playerid, params[]) above of all mysql fetch field lines(1 time)
Thats all i know maybe it should fix some errors


Re: Need help fixing a couple errors [MySQL, +rep] - Luke_James - 06.09.2017

Quote:
Originally Posted by n00blek
Посмотреть сообщение
At lines 83 85 87 it says undefined symbol mysql_idk something
Write new mysql_fetch_field(playerid, params[]) above of all mysql fetch field lines(1 time)
Thats all i know maybe it should fix some errors
No, do not do this OP. This guy has no idea what he's talking about.


Re: Need help fixing a couple errors [MySQL, +rep] - 10MIN - 06.09.2017

@Luke_James This guy scripting level: Negative 0xFFFFFF