What is this? " ____ "
#1

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));
Reply
#2

It's just a string.

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

lol rly?
Reply
#4

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.
Reply
#5

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

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.
Reply
#7

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

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
Reply
#9

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(?)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)