IS4Code / PawnPlus

A SA-MP plugin enhancing the capabilities of the Pawn programming language
MIT License
103 stars 17 forks source link

Errorduring compilation #48

Closed S0P4 closed 2 years ago

S0P4 commented 2 years ago

I ensure my sampctl proyect, dont change any version of any plugin, only update YSI Include and the copiler start to trow errors, yesterday y uses all normaly.

The errors are:

/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:697 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:697 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:721 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:721 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:841 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:841 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:847 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:847 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:853 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:853 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:859 (error) undefined symbol "arg1"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:859 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:867 (error) undefined symbol "arg1"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:867 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:904 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:904 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:910 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:910 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:916 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:916 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:922 (error) undefined symbol "arg1"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:922 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:930 (error) undefined symbol "arg1"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:930 (error) expected token: ";", but found ","
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:1118 (error) undefined symbol "arg0"
/home/sopa/MalosAiresRolePlay/dependencies/PawnPlus/pawno/include/PawnPlus.inc:1118 (error) expected token: ";", but found ","

I try to update to 1.4 but this persist, also happens in windows.

IS4Code commented 2 years ago

There is no arg0 at PawnPlus.inc:697. What are the lines with the latest version?

S0P4 commented 2 years ago

That in particular are from 1.3.2. But, i have the same problem whit 1.4

/media/agustin/Datos/git/MalosAiresCommunityProyect/gamemodes/marp_core.pwn:459 (warning) function with tag result used before definition, forcing reparse
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:707 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:707 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:732 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:732 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:857 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:857 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:863 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:863 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:869 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:869 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:875 (error) undefined symbol "arg1"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:875 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:883 (error) undefined symbol "arg1"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:883 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:929 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:929 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:935 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:935 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:941 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:941 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:947 (error) undefined symbol "arg1"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:947 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:955 (error) undefined symbol "arg1"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:955 (error) expected token: ";", but found ","
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:1169 (error) undefined symbol "arg0"
/media/agustin/Datos/git/MalosAiresCommunityProyect/dependencies/PawnPlus/pawno/include/PawnPlus.inc:1169 (error) expected token: ";", but found ","

That are lines from 1.4

IS4Code commented 2 years ago

I guess some script modifies the native declaration. Try compilling with -l and see what is gets converted to.

S0P4 commented 2 years ago

I add -l and i don't have any error

/media/agustin/Datos/git/MalosAiresCommunityProyect/gamemodes/marp_core.pwn:459 (warning) function with tag result used before definition, forcing reparse
WARN: Build default complete with 1 problems
IS4Code commented 2 years ago

Actually it might not be caused by a macro...

Does this compile for you?

native abc(a=tagof(b), b);
S0P4 commented 2 years ago

Whit -l yes, that compile, whitout that, no, trows the error, also, i make this runs in a semi-bare gm.


sampctl p build
/media/agustin/Datos/git/MalosAiresCommunityProyect/gamemodes/marp_core.pwn:120 (error) undefined symbol "b"
/media/agustin/Datos/git/MalosAiresCommunityProyect/gamemodes/marp_core.pwn:120 (error) expected token: ";", but found ","```
IS4Code commented 2 years ago

You have an unusual version of the compiler then, as the declaration should work normally. You can delete those native definitions for the time being if you do not use them.

S0P4 commented 2 years ago

The compiler is the 3.10.10. I get the compiler via sampclt, and yesterday works fine. try 2 diferents proyects en 2 diferent systems, all updating via sampctl

S0P4 commented 2 years ago

I dont use that ones, but, we are multiple people develop in this proyect, and the idea is update some plugins. So, to doit, we need to remove .samp and than is when that happend, also, the compiler doesnot update since 2020 so i dont understand what is happening. How i say, this morining i delet .samp, use sampctl p ensure and the problems start.

@IllidanS4 some other permanent solution?

Edit: i found the problem, YSI y_iterate library... i move PawnPlus include over YSI and start to compile properly

IS4Code commented 2 years ago

This issue is caused by YSI rewriting the tagof expression on the line as a fix for older compilers, but the result is that the expression becomes a bit more complex. While the (bare) compiler handles this case well:

native abc(a=tagof(b), b);

it, does not accept this:

native abc(a=_:tagof(b), b);

or similar, as it cannot find what b means, as in this case.

Further discussion on the issue.