SA-MP Forums Archive
Help y_inline mysql in linux - 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 y_inline mysql in linux (/showthread.php?tid=665388)



Help y_inline mysql in linux - darkHero - 02.04.2019

All the queries I made with y_inline in linux give me this error: mysql_format: no value for specifier '% d' passed


Re: Help y_inline mysql in linux - polygxn - 02.04.2019

Post the exact line, but the problem is most likely that you missed a variable.


Re: Help y_inline mysql in linux - SymonClash - 02.04.2019

That's because you're adding an extra specifier where is not needed.

Eg:

pawn Код:
VALUES (%d, %d %d), pname, accountid);



Re: Help y_inline mysql in linux - darkHero - 02.04.2019

They really are all querys with y_inline and only happens in linux.

Код:
MySQL_TQueryInline(conexion, using inline CountUsersWork, "SELECT COUNT(*) FROM `users` WHERE `id`=%d AND `work`=%d;", id_user, work);



Re: Help y_inline mysql in linux - darkHero - 03.04.2019

Maybe it could be related.

Код:
YSI Warning: Bare `___` usage found - make sure it is a function parameter.



Re: Help y_inline mysql in linux - darkHero - 03.04.2019

I use these flags:
-d3 -O1 -r includes

Plugins:
Streamer, Sscanf, mysql, crashdetect, profiler, bcrypt, YSF


Re: Help y_inline mysql in linux - darkHero - 03.04.2019

Some work well and others do not.

Код:
[plugins / mysql] mysql_format: no value for specifier '% d' passed
[plugins / mysql] mysql_format: no value for specifier '% d' passed
[plugins / mysql] mysql_format: no value for specifier '% d' passed
[plugins / mysql] mysql_format: no value for specifier '% d' passed
[plugins / mysql] mysql_format: no value for specifier '% d' passed
[plugins / mysql] mysql_format: no value for specifier '% d' passed
[plugins / mysql] mysql_format: no value for specifier '% d' passed
Now it does not show the error line.

Use the compiler 3.10.19

I also want to add that in my windows PC works fine, only when I upload it to the VPS does this happen


Re: Help y_inline mysql in linux - darkHero - 03.04.2019

I did a test removing all the parameters and adding directly.

Код:
MySQL_TQueryInline (connection, using inline CountUsersWork, "SELECT COUNT (*) FROM` users` WHERE `id` = 1 AND` work` = 1; ");
This is the log of mysql.log
Код:
[22:39:31] [DEBUG] created new resultset '0x94cfb18'
[22:39:31] [DEBUG] fetched MySQL result '0x966f3a8'
[22:39:31] [DEBUG] allocated 88 bytes for PAWN result
[22:39:31] [DEBUG] CHandle::Execute - return value: true
[22:39:31] [DEBUG] mysql_tquery: return value: '1' (E:\Documents\user\pawno\include\YSI_Coding\y_inline\y_inline_extra.inc:92 -> core/users.pwn:323)
[22:39:31] [DEBUG] CCallback::Execute(amx=0x92a9ca8, index=76, num_params=2)
[22:39:31] [INFO] Executing callback 'Indirect_FromCallback' with 2 parameters...
[22:39:31] [DEBUG] processing internal specifier 'c'
[22:39:31] [DEBUG] pushed value '1' onto AMX stack
[22:39:31] [DEBUG] processing internal specifier 'c'
[22:39:31] [DEBUG] pushed value '0' onto AMX stack
[22:39:31] [DEBUG] executing AMX callback with index '76'
[22:39:31] [DEBUG] AMX callback executed with error '0'
[22:39:31] [INFO] Callback successfully executed.



Re: Help y_inline mysql in linux - SymonClash - 03.04.2019

It works as you can see.


Re: Help y_inline mysql in linux - darkHero - 03.04.2019

Yes, but it does not show anything the list should be:
- Item 1
- Item 2
- Item 3
- Item 4

What seems strange to me is that in Windows it works, it is only in VPS Linux that it does not list anything and register them if they are inserted.


Re: Help y_inline mysql in linux - darkHero - 04.04.2019

I already did all the tests and this is the error that is shown:

Код:
*** YSI Warning: Bare `___` usage found - make sure it is a function parameter.
The error only occurs in the VPS linux, in Windows it is normally executed.


Re: Help y_inline mysql in linux - darkHero - 04.04.2019

help