Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include and open.mp complicate #277

Open
PazzOnee opened this issue Oct 22, 2023 · 1 comment
Open

Include and open.mp complicate #277

PazzOnee opened this issue Oct 22, 2023 · 1 comment

Comments

@PazzOnee
Copy link

#include <open.mp>

#if defined _INC_y_va
#if defined _INC_open_mp
stock WC_PlayerTextDrawSetString(playerid, PlayerText:text, const string[], OPEN_MP_TAGS:...)
#else
stock WC_PlayerTextDrawSetString(playerid, PlayerText:text, WC_CONST string[], GLOBAL_TAG_TYPES:...)
#endif
#else
stock WC_PlayerTextDrawSetString(playerid, PlayerText:text, WC_CONST string[])
#endif
{
	if (playerid < 0 || playerid >= MAX_PLAYERS) return 0;
	if (_:text < 0 || text >= PlayerText:MAX_PLAYER_TEXT_DRAWS || s_InternalPlayerTextDraw[playerid][text]) return 0;
	#if defined _INC_y_va
		return PlayerTextDrawSetString(playerid, text, string, ___(3));
	#else
		return PlayerTextDrawSetString(playerid, text, string);
	#endif
}

With this checks, and if you dont use YSI (y_va), func will be stock WC_PlayerTextDrawSetString(playerid, PlayerText:text, WC_CONST string[]), if you didn't use y_va, but you have included open.mp, function should be WC_PlayerTextDrawSetString(playerid, PlayerText:text, const string[], OPEN_MP_TAGS:...), but no

@NexiusTailer
Copy link
Contributor

NexiusTailer commented May 1, 2024

if you didn't use y_va, but you have included open.mp, function should be WC_PlayerTextDrawSetString(playerid, PlayerText:text, const string[], OPEN_MP_TAGS:...)

So what's the point to be with OPEN_MP_TAGS:... part, if it won't be used anyhow below? If you didn't include y_va but being on omp libs, you cannot pass non-fixed number of arguments to the other hooks of this function. Current checks are ok and shouldn't be changed in this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants