SA-MP Forums Archive
What is this? " ____ " - 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: What is this? " ____ " (/showthread.php?tid=644983)



What is this? " ____ " - m4karow - 17.11.2017

Hey there

Today i found this on Southclaw's github.

Код:
forward sif_debug_printf(handler, level, playerid, string[], {Float,_}:...);
stock sif_debug_printf(handler, level, playerid, string[], {Float,_}:...)
{
	if(!SIF_IS_VALID_HANDLER(handler))
		return 0;

	if(dbg_Level[handler] < level)
		return 0;

	if(playerid != INVALID_PLAYER_ID && dbg_PlayerLevel[playerid][handler] < level)
		return 0;

	new str[256];
	format(str, sizeof(str), string, ___(4));
	sif_debug_print(handler, level, playerid, str);

	return 1;
}
Код:
new str[256];
	format(str, sizeof(str), string, ___(4));
	sif_debug_print(handler, level, playerid, str);
Anyway i tried to compile this, but i got this error
Код:
error 017: undefined symbol "___"
So i wanna ask, what is this?
Код:
format(str, sizeof(str), string, ___(4));



Re: What is this? " ____ " - Sew_Sumi - 17.11.2017

It's just a string.

You got that error as you didn't include the
Код:
new ___(4);



Re: What is this? " ____ " - m4karow - 18.11.2017

lol rly?


Re: What is this? " ____ " - Codeah - 18.11.2017

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
It's just a string.

You got that error as you didn't include the
Код:
new ___(4);
It is not a string... A string in pawn is just an array of characters.
Array's are defined with []. Not ().

The only thing I can think of is a function called ___ taking in an integer as an argument.
But I really have no clue.


Re: What is this? " ____ " - Konstantinos - 18.11.2017

https://github.com/Misiur/YSI-Includ...a.inc#L94-L128


Re: What is this? " ____ " - m4karow - 18.11.2017

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Many thanks to you! I included that file, but i had an old one. I updated the whole YSI and Zeex's amx assembly include and i could compile my file.


Re: What is this? " ____ " - Misiur - 18.11.2017

Unrelated - @Southclaw, is the ___ working now without any hiccups?


Re: What is this? " ____ " - m4karow - 18.11.2017

sadly it doesnt work for me. compiling is fine, but nothing will print. the last va_args<> method was fine but with theese new files nothing printed


Re: What is this? " ____ " - m4karow - 18.11.2017

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Last time I tested, yes it was working fine and I like the new syntax!



I'm not sure why that's happening, what context are you using it in? Are you just talking about the SIF code?

I still need to get around to writing more isolated unit tests for it - which will happen once the pawn package manager is finished.
i'm using your debug.inc file from your github. I did not make any changes.

This is my code
Код:
sif_d:SIF_DEBUG_LEVEL_CALLBACKS:DEBUG_MYSQL("Connecting to DB with user %s", MYSQL_USER);
sif_d:SIF_DEBUG_LEVEL_CALLBACKS:DEBUG_MYSQL("Host: %s", MYSQL_HOST);
sif_d:SIF_DEBUG_LEVEL_CALLBACKS:DEBUG_MYSQL("DB: %s", MYSQL_DB);
Код:
[2017/11/18 17:00:30] $ [Source/Config/mysql] registered with handle 3 state: 0
[2017/11/18 17:00:33] $ [Source/Config/mysql:1]: Connecting to DB with user root
[2017/11/18 17:00:33]  
[2017/11/18 17:00:33]  
[2017/11/18 17:00:33]  
[2017/11/18 17:00:33]  ======================================= 
[2017/11/18 17:00:33]  |                                     | 
[2017/11/18 17:00:33]  |        YSI version 4.00.0001        | 
[2017/11/18 17:00:33]  |        By Alex "******" Cole        | 
[2017/11/18 17:00:33]  |                                     | 
[2017/11/18 17:00:33]  ======================================= 
[2017/11/18 17:00:33]  
[2017/11/18 17:00:34] [ADM] Info: Load 3DTryg v4.5.2 for SA:MP 0.3.7 by Abyss Morgan
[2017/11/18 17:00:34] *** Audio Plugin: Started TCP server on port 7777
[2017/11/18 17:00:34] *** Audio_SetPack: Audio pack set to "server" (transferable and automated)
[2017/11/18 17:00:34] $ [Source/Core/audio] registered with handle 4 state: 0
you can see 3/1 line printed, the others just gone(?)