compiler
compiler copied to clipboard
Passing arguments by reference unexpected syntax requirement
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:
- Compiler version: 3.10.10
- Command line arguments provided (or sampctl version): Standard sublime by Southclaws
- Operating System: Windows 7 Ultimate x64 SP1
This issue has been automatically marked as stale because it has not had recent activity.