Jump to content

[Suggestion] NPC Variable Tracker for Debug purpose


Zell

Recommended Posts


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   260
  • Joined:  04/25/12
  • Last Seen:  

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

Sample:

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

Console Output:
[DEBUG NPC_NAME / PLAYER ATTACHED_GID]: Tracking .@var > Value: 0
[DEBUG NPC_NAME / PLAYER_ATTACHED_GID]: .@var was required > Value: 0
[DEBUG NPC_NAME / PLAYER_ATTACHED_GID]: .@var was changed> Old Value: 0 / New Value: 1
[DEBUG NPC_NAME / PLAYER_ATTACHED_GID]: .@var 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
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

use debugmes ? to display the info

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   260
  • Joined:  04/25/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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.

Link to comment
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...