CallRemoteFunction tag mismatch
#1

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)