mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-08 09:57:52 -05:00
New compiler error discovered
Additionally, each compiler error type is now numbered and any references to info.md will include that number in order to make it more obvious what error had to worked around for successful recompiling.
This commit is contained in:
parent
866baa824c
commit
1d1fea7768
24
info.md
24
info.md
@ -1,10 +1,10 @@
|
|||||||
# Limitations of the compiler
|
# Limitations of the compiler
|
||||||
|
|
||||||
**You cannot use nested foreaches it will cause an infinite loop**
|
**1. You cannot use nested foreaches it will cause an infinite loop**
|
||||||
|
|
||||||
**You cannot use continues in foreaches or for loops it will cause an infinite loop**
|
**2. You cannot use continues in foreaches or for loops it will cause an infinite loop**
|
||||||
|
|
||||||
**You should always use parenthesis when comparing values using conditions while using operators**
|
**3. You should always use parenthesis when comparing values using conditions while using operators**
|
||||||
|
|
||||||
```( 0 - 1 ) < 1``` is NOT the same as ```0 - 1 < 1``` the compiler will compile it as ```0 - ( 1 < 1 )```
|
```( 0 - 1 ) < 1``` is NOT the same as ```0 - 1 < 1``` the compiler will compile it as ```0 - ( 1 < 1 )```
|
||||||
|
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
ALWAYS SPECIFY PARENTHESIS WHEN OPERATORS ARE INVOLVED
|
ALWAYS SPECIFY PARENTHESIS WHEN OPERATORS ARE INVOLVED
|
||||||
|
|
||||||
**You cannot use more than 2 conditions in an IF statement connected by OR operators enclosed in parenthesis** EXAMPLE:
|
**4. You cannot use more than 2 conditions in an IF statement connected by OR operators enclosed in parenthesis** EXAMPLE:
|
||||||
```
|
```
|
||||||
if ( ( a || b || c ) && d )
|
if ( ( a || b || c ) && d )
|
||||||
```
|
```
|
||||||
@ -27,7 +27,7 @@ OR
|
|||||||
if ( a && d || b && d || c && d )
|
if ( a && d || b && d || c && d )
|
||||||
```
|
```
|
||||||
|
|
||||||
**You cannot use OR operators in an IF statement in parenthesis if the string of conditions would not be on the leftmost side of the if statement and the number of conditions on the rightmost side is not at least 2.**
|
**5. You cannot use OR operators in an IF statement in parenthesis if the string of conditions would not be on the leftmost side of the if statement and the number of conditions on the rightmost side is not at least 2.**
|
||||||
EXAMPLE:
|
EXAMPLE:
|
||||||
```
|
```
|
||||||
if ( a && ( b || c ) )
|
if ( a && ( b || c ) )
|
||||||
@ -44,12 +44,22 @@ if ( ( a || b ) && ( c || d ) )
|
|||||||
WILL COMPILE
|
WILL COMPILE
|
||||||
```
|
```
|
||||||
|
|
||||||
**You cannot set variables equal to a condition**
|
**6. You cannot set variables equal to a condition**
|
||||||
EXAMPLE:
|
EXAMPLE:
|
||||||
```a = b && c;```
|
```a = b && c;```
|
||||||
WILL NOT COMPILE
|
WILL NOT COMPILE
|
||||||
```
|
```
|
||||||
|
|
||||||
**Scripts that contain #using_animtree( "animtree" ); will compile but crash upon loading**
|
**7. Scripts that contain #using_animtree( "animtree" ); will compile but crash upon loading**
|
||||||
Unfortunately, for certain scripts #using_animtree( "animtree" ); is required for the script to function so scripts containing it will crash on start/while running
|
Unfortunately, for certain scripts #using_animtree( "animtree" ); is required for the script to function so scripts containing it will crash on start/while running
|
||||||
|
There is a workaround using script names such as maps/mp/gametypes_zm/_globalentities and naming an extracted but not decompiled script
|
||||||
|
|
||||||
|
**8. You cannot use variable defined notifies/waittills**
|
||||||
|
EXAMPLE:
|
||||||
|
```
|
||||||
|
var = "connected";
|
||||||
|
level notify( var, player );
|
||||||
|
level waittill( var, player );
|
||||||
|
WILL COMPILE BUT
|
||||||
|
```
|
||||||
|
The notify/waittill won't work.
|
Loading…
x
Reference in New Issue
Block a user