Difference between revisions of "Debug Scripts"

490 bytes added ,  14:46, 14 November 2006
no edit summary
imported>AdiBeiElderScrolls
imported>AdiBeiElderScrolls
PickIdle My name is Bob</pre>
 
:Yep, in fact, thats what's also true. But the GetCurrentAIPackage worked this time like a return function ... so it didn't execute any code above the first occurrence of GetCurrentAIPackage due to the use of nonot using it correctly in a compare statement ... but using a (valid) parameterspackage name ... just try (the package hasdoesn't need to be associated alsorelated to the NPC - at least that was my situation)
 
<pre>GetCurrentAIPackage "AnyParameterNotValid-ButMaybeValidPackageName?ValidPackageName"
PickIdle My name is Bob</pre>
 
:Or
 
<pre>If ( GetCurrentAIPackage "AnyParameterNotValid-ButMaybeValidPackageName?ValidPackageName" )
PickIdle My name is Bob
EndIf</pre>
 
:I used the following test sequence with an NPC not related to the used package to verify the problem. It turned out, that script could not be saved, if no valid package name was given. Also, it happened, that the script afterwards didn't seem to execute anymore. FramesRun stayed at value 1, even if talking to the NPC (activating)
 
<pre>short FramesRun
Begin GameMode
 
Set FramesRun To FramesRun+1
Message "Test before GetCurrentAIPackage"
 
If ( GetCurrentAIPackage aaaCreatureExterior1500 )
Message "Test aaaCreatureExterior1500 package name"
EndIf
; at least I used valid package names and didn't test it
; against invalid parameters</pre>
 
Message "Still alive"
:So you see, some functions (especially that one's that can also work like a return function) have unwanted behavior, not foreseen and others don't!▼
 
... other code
End</pre>
 
▲:So you see, some functions (especially that one's that can also work like a return function) may have unwanted behavior, not foreseen and others don't!
 
:Details about configuration: Using localized german version, with Update German V1.1, Plugin Oblivion Deutsch 3.0, BTMod 2.20