• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Help: warning 213 tag mismatch
#1
Heyo,



recently got back into scripting, and trying to create a function.



"function:SetPlayerCamera(playerid)"



When I compile, I get warning "warning 213: tag mismatch: expected tag "Function", but found none ("_")"



It seems to be with the tag "function", but when I remove it, it works fine. This only seems to be an issue in the new compiler, but I'm struggling to understand why. Could someone please explain what this warning actually means and what best practice would be?



cheers,
  Reply
#2
That's NOT how you are supposed to create a function.



Code:
tag:function()

{

    return tag; // i.e. false if bool:function

}

You don't need a tag if you won't use it.
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#3
(2021-01-19, 06:37 PM)Pinch Wrote: That's NOT how you are supposed to create a function.



Code:
tag:function()

{

? ? return tag; // i.e. false if bool:function

}

You don't need a tag if you won't use it.



Thanks, I last programmed PAWN like 3/4 years ago. I was following a tutorial which added tags, hence the confusion.
  Reply


Forum Jump: