Jump to content
Zell

[Suggestion] NPC Variable Tracker for Debug purpose

Recommended Posts

Would be nice to have a feature that track and show in console a variable for when we are making complex scripts.

Sample:

[email protected] = 0;
trackvar("[email protected]");
mes "Now I will show this value " + [email protected];
next;
[email protected]++;
mes "Now I changed the var";
next;
mes "Hmm, what value " + [email protected] + " had when passed here?";
close;

Console Output:
[DEBUG NPC_NAME / PLAYER ATTACHED_GID]: Tracking [email protected] > Value: 0
[DEBUG NPC_NAME / PLAYER_ATTACHED_GID]: [email protected] was required > Value: 0
[DEBUG NPC_NAME / PLAYER_ATTACHED_GID]: [email protected] was changed> Old Value: 0 / New Value: 1
[DEBUG NPC_NAME / PLAYER_ATTACHED_GID]: [email protected] was required > Value: 1
 

I think this would make it easier to develop or debug scripts, rather than every time you call it, creating visual texts (dispbottom/announce) to keep track of the variable

  • Upvote 1

Share this post


Link to post
Share on other sites

use debugmes ? to display the info

 

Share this post


Link to post
Share on other sites
50 minutes ago, Emistry said:

use debugmes ? to display the info

 

I think he meant a command that will automatically do debugmes once you track it and do away with you putting debugmes everytime in every single line where the var is changed.

Share this post


Link to post
Share on other sites
9 hours ago, Ninja said:

I think he meant a command that will automatically do debugmes once you track it and do away with you putting debugmes everytime in every single line where the var is changed.

Exactly

Share this post


Link to post
Share on other sites

I don't a problem with this, but seems unnecessary as if your doing proper coding it should not be an issue to track it yourself.

And this is having had to dispbottom/annouce to debug myself. For a script that has alot of moving parts or lord forbid forloops I can see this getting very very messy in the console and not being super helpful where it's probably needed the most.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.