SA-MP Forums Archive
CallRemoteFunction tag mismatch - 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: CallRemoteFunction tag mismatch (/showthread.php?tid=655030)



CallRemoteFunction tag mismatch - Stefand - 11.06.2018

Hi,

I am scripting modular so I use hooks. I never had this issue before so I dont know what I am doing wrong here.

Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
	CallRemoteFunction("OPCPTD", "ii", playerid, playertextid);
	return 1;
}
the CallRemoteFunction line gives the tag mismatch error.


Re: CallRemoteFunction tag mismatch - Stefand - 11.06.2018

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
`CallRemoteFunction` (and its local partner) are declared to take `{Float,_}:` which means it only accepts `Float` and `_` (no tag). You need to de-tag any arguments to avoid tag mismatch warnings.
The wiki says:

function[] Public function's name.
format[] Tag/format of each variable
{Float,_}:... 'Indefinite' number of arguments of any tag

And I used it with:
Код:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
	CallRemoteFunction("OPEDO", "iidffffff", playerid, objectid, response, x, y, z, rx, ry, rz);
	return 1;
}
too


Re: CallRemoteFunction tag mismatch - Stefand - 11.06.2018

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Ah, the wiki is incorrect here as the definition is definitely either Float or _ and nothing else.

There is currently no way to specify "any tag" but there is an open issue for it here: https://github.com/pawn-lang/compiler/issues/264
Any idea why the other example I showed works then? It has iid and then floats.