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

pawnc reports wrong filenames and line numbers on warning number 203 & 213 #732

Open
Zorono opened this issue Jul 16, 2024 · 0 comments
Open

Comments

@Zorono
Copy link

Zorono commented Jul 16, 2024

Issue description:

when there is a unused variable and tag mismatch in a file which is included in multiple areas
while I didn't use LABEL::Data yet or even that iterator labels

in main.pwn: #include "./structure/main.inc"
in main.inc: #include "helpers/labels.inc"
in labels.inc:

#define LABEL:: lbl_
#define MAX_LABELS (700)
enum LabelData
{
    ID,
    Text3D:Label,
    Text[150],
    Color,
    Interior,
    VirtualWorld,
    Float:PosX,
    Float:PosY,
    Float:PosZ
};
new LABEL::Data[MAX_LABELS][LabelData],
    Iterator:Labels<MAX_LABELS>,
  • observed behavior
    it reports
structure/main.inc(26740) : warning 213: tag mismatch: expected tags "T_WEAPON", "Float", or none ("_"); but found "LabelData"
structure/main.inc(26741) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26741) : warning 213: tag mismatch: expected tag "LabelData", but found none ("_")
structure/main.inc(26743) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26744) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26748) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26750) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26753) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26754) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26755) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26758) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26759) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26760) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26762) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
main.pwn(48) : warning 203: symbol is never used: "Labels@YSII_Ag"
main.pwn(48) : warning 203: symbol is never used: "Labels@YSII_Cg"
main.pwn(47) : warning 203: symbol is never used: "lbl_Data"

which is wrong filenames and line numbers...

Workspace Information:

  • Compiler version: 3.10.11
  • Command line arguments provided (or sampctl version):
pawncc.exe main.pwn -;+ -(+ -d3 -O0 -Z+ -C+ -t4 -D"Z:\path\to\Server\gamemodes" -o"Z:\path\to\gamemodes\main.amx" -i"Z:\path\to\dependencies" -i"Z:\path\to\dependencies\openmultiplayer"
  • Operating System: Windows 10 Pro (x64)
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

1 participant