fte-team / fteqw

This is the official GitHub mirror for the FTEQW project.
https://www.fteqw.org/
179 stars 55 forks source link

Can't sizeof a field array #70

Closed Xylemon closed 1 year ago

Xylemon commented 1 year ago

https://sourceforge.net/p/fteqw/tickets/90/

paril101 wrote on 2020-07-09:

Attempting to sizeof a field array throws ``` hud.qc:478: warning: Is this still needed? hud.qc:478: error: Address-of operator is not supported in this form without extensions. Consider the use of: #pragma target fte

MVP:

.int field[10]; entity ent; int x = sizeof(ent.field);

Xylemon commented 1 year ago

@eukara wrote on 2022-03-06:

The compiler should now throw an error for this: error: .__int* is not a field