pawn-lang / compiler

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

'array must be indexed' error when using addr.u.pri #677

Closed dev-karpov0 closed 2 years ago

dev-karpov0 commented 3 years ago

Issue description:

The following code results in compilation error:

new array[32];
new addr1 = __emit(addr.u.pri array);//error 033: array must be indexed (variable "array")
new addr2 = __emit(addr.u.pri array[0]);//Ok

Is it normal behavior? Both lines of code sould have the same result.

Workspace Information:

Daniel-Cortez commented 2 years ago

Yes, this is intended behavior. Universal pseudo-opcodes were created with the main purpose of being used in macros and handling the input from users (and by "users" I mean just regular users, not library writers), so their operands are supposed to be single cells.