Why does this script stop working?

Post » Sat May 28, 2011 2:13 pm

Hey, I have a script that spawns waves on NPC's, but for whatever reason it stops after wave 2 spawns. I included messages in the wave 3 section to test if it runs it, and it doesn't. This means that it just seems to stop running after the 2nd wave, none of the later waves spawn afterthat.


It bugged pasting the code here, the &&'s are missing in the if statements
ScriptName PLWaveAttacksfloat timer begin gameModeif (( timer < 40 ) && (PLWave1REF.getDisabled ==1))set timer to timer + getSecondsPassedreturnelse                                                                PLWave1REF.Enableendifif (( timer < 95 ) && (PLWave2REF.getDisabled ==1))set timer to timer + getSecondsPassedreturnelse                                                                SetStage PLWaves 2PLWave2REF.Enableendifif (( timer < 140 ) (PLWave3REF.getDisabled ==1))set timer to timer + getSecondsPassedmessage "count" ,1returnelse                                                                SetStage PLWaves 3PLWave3REF.Enablemessage "spawn",10endifif (( timer < 200 ) (PLWave4REF.getDisabled ==1))set timer to timer + getSecondsPassedreturnelse                                                                SetStage PLWaves 4PLWave4REF.Enableendifif (( timer < 260 ) (PLWave5REF.getDisabled ==1))set timer to timer + getSecondsPassed

User avatar
Steve Smith
 
Posts: 3540
Joined: Sat Jun 30, 2007 10:47 am

Post » Sat May 28, 2011 11:21 am

Are the "&&" really missing in those if's? I am surprised it would save if that is the case.
User avatar
Dezzeh
 
Posts: 3414
Joined: Sat Jun 16, 2007 2:49 am

Post » Sat May 28, 2011 11:54 am

You need to put && between if (( timer < 140 ) and (PLWave3REF.getDisabled ==1)). You also need to do that for all of the waves after that one.

Edit: Ninja'd by Ghastly
User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm

Post » Sat May 28, 2011 12:15 pm

You need to put && between if (( timer < 140 ) and (PLWave3REF.getDisabled ==1)). You also need to do that for all of the waves after that one.

Edit: Ninja'd by Ghastly


its a bug, there should be there, they are in my script but didn't paste in correctly

EDIT: Sorry, I found the source of the problem, I had a conflicting script
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am


Return to IV - Oblivion