pawn-lang / compiler

Pawn compiler for SA-MP with bug fixes and new features - runs on Windows, Linux, macOS
Other
306 stars 72 forks source link

Passing arguments by reference unexpected syntax requirement #618

Open BitFros7y opened 3 years ago

BitFros7y commented 3 years ago

Issue description:

Issue is just small unexpected syntax behavior that should be improved Placing & after tag and before variable drops error error 001: expected token: "-identifier-", but found "&" stock demostrationFunc(Float: &testvarref) Drops error above

I would expect it to work just fine like it does if its in front of tag like here stock demostrationFunc(&Float: testvarref) <- That works fine

Minimal complete verifiable example (MCVE):

#include <a_samp>
#include <fixes>

main()
{
    new Float: mytestvar;
    demostrationFunc(mytestvar);
}

stock demostrationFunc(Float: &testvarref)//These fails, drops error
{
    testvarref = 4.333;
}

Workspace Information:

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity.