27.01.2019, 08:54
Hello,
I've been trying to make some kind of relationship ownership system and stuck on making a function.
Here's little example I rewrote and it gave me same error:
There's another solutions like just assigning variable to variable but I'd like just to know why it gives this error when using enums in function params? Is it possible to fix?
I'm using comunity compiler v3.10.8. Tried with v3.10.9 but even with -Z flag it gives me those warnings and (007 error : operator cannot be redefined) on my function at line 38 . I'm quite lost in this situation.
I've been trying to make some kind of relationship ownership system and stuck on making a function.
Here's little example I rewrote and it gave me same error:
Code:
enum OwnerType { player, vehicle } enum OwnerInfo { oSQL, OwnerType:oType } enum PlayerInfo { pOwner[OwnerInfo] } enum VehicleInfo { vOwner[OwnerInfo] } new Player[MAX_PLAYERS][PlayerInfo]; new Vehicle[MAX_VEHICLES][VehicleInfo]; foo(a[OwnerInfo], b[OwnerInfo]) { a[oSQL] = b[oSQL]; } main() { foo(Player[0][pOwner], Vehicle[0][vOwner]); // line 38 error 047 }
Code:
..\gamemodes\a.pwn(38) : error 047: array sizes do not match, or destination array is too small
I'm using comunity compiler v3.10.8. Tried with v3.10.9 but even with -Z flag it gives me those warnings and (007 error : operator cannot be redefined) on my function at line 38 . I'm quite lost in this situation.