Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Help: warning 213 tag mismatch

 
  • 0 Vote(s) - 0 Average
Pawn Help: warning 213 tag mismatch
Behemoth
Offline

Burgershot Member
Posts: 25
Threads: 4
Joined: Jan 2021
Reputation: 1
Location: Northern Ireland, UK
#1
2021-01-19, 06:17 PM
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,
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#2
2021-01-19, 06:37 PM
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.
Behemoth
Offline

Burgershot Member
Posts: 25
Threads: 4
Joined: Jan 2021
Reputation: 1
Location: Northern Ireland, UK
#3
2021-01-19, 07:16 PM
(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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode