Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 03-01-2010, 10:38 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by adam View Post
So.. you misunderstood the point of the entire post, and now your still not going to let it go?
I did misunderstand the origional post, however can show me how to debug a script without showing an example.
__________________
Reply With Quote
  #17  
Old 03-02-2010, 05:49 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by xAndrewx View Post
I did misunderstand the origional post, however can show me how to debug a script without showing an example.
This guide is for starters. Try to explain this concept/idea to somebody who is a complete newbie to scripting/coding, without any examples.
Reply With Quote
  #18  
Old 03-02-2010, 08:07 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Crow View Post
This guide is for starters. Try to explain this concept/idea to somebody who is a complete newbie to scripting/coding, without any examples.
Exactly- thank you.
__________________
Reply With Quote
  #19  
Old 03-03-2010, 12:59 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I'll offer some things that I do when I need to debug something:

1. Be explicit, less chance for weird GS2 stuff to happen that way. What this means, prefix variables and function calls appropriately. Avoid ambiguity with variable names, make sure they don't conflict with existing things, etc. And don't do things like putting code outside of a function definition.

2. Echoes. I put echoes everywhere so I can tell where the script is executing, what parameters and objects exist at a certain point, etc. type() and objecttype() functions are useful for checking the state of objects.

3. Formatting. I'm anal about script formatting and adhere to strict methods of spacing and naming. Doing this means less chance of screwing up because you forgot a bracket or something. I also stick to using lower-case variable names in all but object names.
__________________
Reply With Quote
  #20  
Old 03-03-2010, 01:06 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Using Jerret's debugger can be very helpful.
__________________
Reply With Quote
  #21  
Old 03-03-2010, 05:26 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by cbk1994 View Post
Using Jerret's debugger can be very helpful.
Quote:
Originally Posted by Crow View Post
Doesn't matter, he's just trying to show how he debugs his code. I'd say it'd be easier (better even) to use a this.var instead, and then monitoring it with Jerret's debugger.
Duh
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.