You have two '10's which is probably a typo. One of them probably should be a '9'.
Yea typo lol one last question on 'Return' does 'Return' stop rest of the code from executing? here is it so far
SCN CUSRINLinPoopleattSCRPTshort enGo ; 1 = start the encounter ;2 = encounter not doneshort EnReturn ; 1 = cancel encountershort encounterNumshort EnEnd ;set to 1 from a different script (the NPCs script)BEGIN GameModeif player.getincell OldOlney01 == 0 ;PC is now not in the cell OldOlney01if EnReturn == 1 ; used if one or more of the NPCs are still dead and has not being respawned yet.set EnReturn to 0 ; sets back to 0Return ;******THISendifif enGo ==1 && EnEnd ==0set enGo to 0elseif enGo == 2 && EnEnd ==1set enGo to 0set enEnd to 0endifendifendifif player.getincell OldOlney01 == 1 && enGo == 0 && EnEnd == 0 set encounterNum to GetRandomPercent * 1/10 if encounterNum == 1;Do nothing set enGo to 1 elseif encounterNum >= 2 && encounterNum <=4 if CUSRENLinPeopleF44MagREF.getdead == 0 && CUSRENLinPeopleMREF.getdead == 0CUSRENLinPeopleF44MagREF.enableCUSRENLinPeopleMREF.enableCUSRENLinPeopleF44MagREF.moveto playerCUSRENLinPeopleMREF.moveto playerset enGo to 2elseset EnReturn to 1 ;Err One or both NPCs are dead cancel encounter for now.Return ;******THISendifelseif encounterNum == 5set enGo to 1elseif encounterNum == 6set enGo to 1 ;Do nothing set to 1 to stop code from executing till PC reenters cell OldOlney01elseif encounterNum == 7set enGo to 1 ;Do nothing set to 1 to stop code from executing till PC reenters cell OldOlney01elseif encounterNum == 8set enGo to 1 ;Do nothing set to 1 to stop code from executing till PC reenters cell OldOlney01elseif encounterNum == 9set enGo to 1 ;Do nothing set to 1 to stop code from executing till PC reenters cell OldOlney01elseif encounterNum == 10set enGo to 1 ;Do nothing set to 1 to stop code from executing till PC reenters cell OldOlney01ENDIFENDIFEND
Nothing much for the NPCs scr
SCN LinPeopEn01SCRshort DeathCounterBEGIN ondeathset DeathCounter to DeathCounter +1if DeathCounter >=2set DeathCounter to 0set CUSRINLinPeopleatt.EnEnd to 1endifEND