AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Warning: Expression with tag override must appear between parentheses (https://forums.alliedmods.net/showthread.php?t=294604)

grs4 03-03-2017 03:22

Warning: Expression with tag override must appear between parentheses
 
Hi, i have this code:

PHP Code:

return _:info ReadPackCell(DataPack:pack) : ReadPackFloat(DataPack:pack); //line 141 

And error

PHP Code:

WarningExpression with tag override must appear between parentheses on line 141AMX Mod X Compiler 1.8.3-dev+5097
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2013 AMX Mod X Team

Warning
Expression with tag override must appear between parentheses on line 141
Error
Expected token","but found ":" on line 141
Error
Invalid expressionassumed zero on line 141
Error
Invalid expressionassumed zero on line 141
Error
Too many error messages on one line on line 141 

But when i change to

PHP Code:

    return _:info ReadPackCell((DataPack:pack)) : ReadPackFloat((DataPack:pack)); 

( '(' and ')' in ReadPackCell & ReadPackFloat )

PHP Code:

AMX Mod X Compiler 1.8.3-dev+5097
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2013 AMX Mod X Team

Header size
:           1012 bytes
Code size
:            11292 bytes
Data size
:            10452 bytes
Stack
/heap size:      16384 bytes
Total requirements
:   39140 bytes
Done



So, why "(" are neccesarry in case?

I think compilator thinks that first ":" is a separator between second expression.
why?

klippy 03-03-2017 05:27

Re: Warning: Expression with tag override must appear between parentheses
 
Yes, it's probably that it can't distinguish a tag override from expression end.


All times are GMT -4. The time now is 21:04.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.