Difference between revisions of "Script Debugging"
(→Examples) |
|||
Line 1: | Line 1: | ||
So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script | So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script | ||
+ | |||
+ | |||
+ | =Examples= | ||
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions | We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions | ||
− | = | + | ==Example 1== |
+ | This is a great example from MalucoBeleza that illustrates the kind concept of logging out your results to the console for further insight into what objects a trigger is referencing | ||
+ | The trigger in this example is [@kill] | ||
+ | |||
+ | 1) I.SAY My name is <I.NAME>! | ||
+ | 2) SRC.SAY My name is <SRC.NAME>! | ||
+ | 3) SAY My name is <NAME>! | ||
+ | |||
+ | When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this: | ||
− | = | + | ON=@Kill |
+ | SERV.LOG NAME: <NAME> | ||
+ | SERV.LOG I.NAME: <I.NAME> | ||
+ | SERV.LOG SRC.NAME: <SRC.NAME> | ||
+ | SERV.LOG ARGO.NAME: <ARGO.NAME> | ||
+ | SERV.LOG <NAME> (<UID>) HAVE JUST KILLED <ARGO.NAME> (<ARGO>) |
Revision as of 16:08, 18 August 2022
So you've got a problem with a script and you don't know where to turn? Or everyone you've spoken to doesn't have the answers you seek? You're about to start pulling out your hair, you feel alone and lost, and no one can seem to help you. Well you're about to help yourself! Let's talk about debugging your script
Examples
We'll go through some examples here to explain how one could get helpful information that will lead them to their solutions
Example 1
This is a great example from MalucoBeleza that illustrates the kind concept of logging out your results to the console for further insight into what objects a trigger is referencing The trigger in this example is [@kill]
1) I.SAY My name is <I.NAME>! 2) SRC.SAY My name is <SRC.NAME>! 3) SAY My name is <NAME>!
When dealing with a trigger that is new to you... its essencial to check the wiki and do tests like this:
ON=@Kill
SERV.LOG NAME: <NAME> SERV.LOG I.NAME: <I.NAME> SERV.LOG SRC.NAME: <SRC.NAME> SERV.LOG ARGO.NAME: <ARGO.NAME> SERV.LOG <NAME> (<UID>) HAVE JUST KILLED <ARGO.NAME> (<ARGO>)