This seems to be more of a lexical error than a syntactical one.
What's strange about:
(script dormant flood_drop
(if
(and
(< 4 (ai_living_count flood_begin/flood_begin ))
(< 3 (ai_living_count flood_begin/flood_begin_2 )))
(ai_place flood_begin/flood_begin_3)
(wake flood_respawn)
)
)
is that you're saying:
if 4 is less than the ai living count of flood_begin and 3 is less than the ai living count of flood_begin_2, then place the encounter and wake flood_respawn. What this translates to is:
If the AI living count is greater than 4 and 3, then do the statements listed. If this is what you want, then read below, but judging from the name of the encounter, flood_respawn, I'm assuming you want to spawn more AI when the amount of AI is less than the provided numbers.
The command (< [param 1] [param 2]) checks whether [param 1] < [param2], not the other way around. If you wanted to restructure that, you'd say:
(script dormant flood_drop
(if
(and
(< (ai_living_count flood_begin/flood_begin ) 4)
(< (ai_living_count flood_begin/flood_begin_2 ) 3)
)
(begin
(ai_place flood_begin/flood_begin_3)
(wake flood_respawn)
)
)
)
Now, if that wasn't what you wanted, and you looked at the script above, you'd notice that I added a (begin block. The problem with your script, is that if the conditions are true, it'll place the AI, but the script won't wake flood_respawn unless the statements are FALSE. The reason for this, is the syntax for an if statement is:
(if
(condition)
(do this)
(else do this)
)
Since you didn't group your statements in a (begin block, they're counted separately, with the ai_place added as a (do this), and the wake command added as the (else do this). Again, the script I posted above should fix this.
Edited by Gamma927 on Aug 23, 2010 at 05:04 PM