You misunderstood ghastley. What he means that you're not interested in knowing if issneaking returns exactly 1, but rather whether the player is sneaking, thus no need for the "== 1" part.
The only thing the CS would react on in your script is the "Result" line. "If (player.issneaking == 1)" is certainly ok.
Hmm, I just placed the word "result" as a generic term. That particular part of the script is pretty large. I have a truncated version of it that only has two results. Here it is:
scn AASWRanEnc
;This is the random chance and type for encounters
Short SWChance1
Short SwChance2
Begin Gamemode
If (player.issneaking == 1) && If (GetStage AASW >= 20)
Set SWChance1 to Rand 1 4
Else
Return
EndIf
If (SWChance1 <= 2)
Set SwChance2 to Rand 1 2
Else
Return
Endif
If (SwChance2 <= 1)
Assas1Ref.moveto Player 100,100,0
Assas1.enable
Elseif (SwChance2 >= 2)
Assas2Ref.moveto Player -100,-100,0
Assas2Ref.enable
Endif
End
Edit: I'm still getting the undefined error for line 10, which is the player.issneaking and stage check. I took out the stage check and it was able to move on, so there must be a problem with the stage check. Syntax looks fine to me though. It must be something to do with the way I have the stage set up.
Edit2: I have this on a quest script and just did a test run of the script and it called the NPC up. Unfortunately, it seems to have stopped working after that. I thought quest scripts were supposed to run every 5 seconds.