Difference between revisions of "Debugging Plugins (AMX Mod X)"

From AlliedModders Wiki
Jump to: navigation, search
m
m (Reverted edits by XpyPru (Talk); changed back to last version by BAILOPAN)
 
Line 1: Line 1:
[[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=224 sagem ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=101 meridia online]] [[http://wc1.worldcrossing.com/WebX/.1de609ee but hydrocodone]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30244 cheap diazepam]] [[http://wc1.worldcrossing.com/WebX/.1de609e0 ativan online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2861 cheap norco]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2877 prozac online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=216 sonyericsson ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=360 qwest ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=190 lisinopril online]] [[http://wc1.worldcrossing.com/WebX/.1de60a10 cheap didrex]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=228 ultram online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=76 cialis]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30259 alprazolam online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=359 nextel ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de609e5 cool ringtones]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2888 cheap lortab]] [[http://library.cshl.edu/wp/vb/member.php?u=1373 free nextel ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=216 zyban online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=206 pharmacy online online]] [[http://library.cshl.edu/wp/vb/member.php?u=1344 cheap xanax]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=344 ativan]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30345 free sprint ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30248 cheap ativan]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=131 free sprint ringtones]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2871 wellbutrin online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=146 buy zanaflex]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=154 carisoprodol online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30280 propecia online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=118 prozac online]] [[http://library.cshl.edu/wp/vb/member.php?u=1341 valium online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=144 cheap xanax]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2905 motorola ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=112 but ortho]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=223 cheap wellbutrin]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=169 cheap levitra]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=156 fioricet]] [[http://library.cshl.edu/wp/vb/member.php?u=1377 samsung ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30312 ortho online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30356 free cool ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de609f0 lorazepam online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=187 cheap celexa]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30230 tramadol online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=211 free polyphonic ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=214 zanaflex online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=110 free nokia ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=189 cheap ortho]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=237 samsung ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=151 cheap soma]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=99 lorazepam online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2912 sagem ringtones]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2907 sprint ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a17 lipitor online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30334 free mp3 ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=234 sprint ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=141 buy vigrx]] [[http://wc1.worldcrossing.com/WebX/.1de60a23 free polyphonic ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a1f lisinopril online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=197 free mp3 ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1349 viagra online]] [[http://library.cshl.edu/wp/vb/member.php?u=1382 free cingular ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30310 tenuate online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2922 kyocera ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=206 qwest ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de609f9 norco online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=351 buy clonazepam]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2878 cheap sildenafil]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2902 free nextel ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=357 funny ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1347 but cialis]] [[http://library.cshl.edu/wp/vb/member.php?u=1365 ultracet online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=210 free sprint ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=158 cheap diazepam]] [[http://wc1.worldcrossing.com/WebX/.1de609ea free ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a25 free samsung ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=88 free ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1358 hydrocodone online]] [[http://library.cshl.edu/wp/vb/member.php?u=1339 tramadol online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2868 ambien online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=228 mtv ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=104 motorola ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=89 free funny ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=211 free music ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=80 cool ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1388 cheap fioricet]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=361 real ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=172 lorazepam]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=333 cheap soma]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=182 cheap clomid]] [[http://library.cshl.edu/wp/vb/member.php?u=1355 but clonazepam]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=205 paxil online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=184 cheap lisinopril]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=124 samsung ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a04 sonyericsson ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=115 phentermine online]] [[http://library.cshl.edu/wp/vb/member.php?u=1387 free alltel ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a05 sprint ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=167 cheap clonazepam]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30283 buy didrex]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=157 cheap ultram]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=230 free verizon ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30309 celexa online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=348 cheap norco]] [[http://wc1.worldcrossing.com/WebX/.1de60a11 diethylpropion online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=188 tenuate online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=212 free verizon ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30308 lipitor online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=82 buy diazepam]] [[http://library.cshl.edu/wp/vb/member.php?u=1380 free verizon ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=163 adipex online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2859 cheap meridia]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=209 free samsung ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=170 cingular ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=78 clomid]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30298 lisinopril online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=74 carisoprodol online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=352 cheap paxil]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=227 ericsson ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1386 free mono ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=69 cheap albuterol]] [[http://wc1.worldcrossing.com/WebX/.1de60a12 free ericsson ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=171 order ambien]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=188 levitra online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=83 didrex online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30358 midi ringtones]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2879 clomid online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=186 lipitor online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=215 sagem ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=346 cheap meridia]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2923 sony ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30237 cheap valium]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=171 clomid online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=184 hoodia online]] [[http://wc1.worldcrossing.com/WebX/.1de60a1b music ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30264 cheap hydrocodone]] [[http://wc1.worldcrossing.com/WebX/.1de609db cheap adipex]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30321 cheap hgh]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=90 hgh online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30263 levitra online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=133 tracfone ringtones]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=226 free sony ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=117 propecia online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=165 cheap vicodin]] [[http://library.cshl.edu/wp/vb/member.php?u=1340 soma online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2909 free verizon ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30252 meridia online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=221 cheap vicodin]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30347 verizon ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1354 alprazolam online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30330 free nokia ringtones]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2903 qwest ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a26 sharp ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30348 polyphonic ringtones]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=345 cheap viagra]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=239 sildenafil online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2876 didrex online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=142 online wellbutrin]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2872 cyclobenzaprine online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30333 funny ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a00 rivotril online]] [[http://library.cshl.edu/wp/vb/member.php?u=1356 paxil online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30357 free sharp ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=123 sagem ringtones]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30268 xenical online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=92 hydrocodone online]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=100 lortab online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2850 phentermine online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2869 cheap lorazepam]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=116 free polyphonic ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1361 cheap xenical]] [[http://library.cshl.edu/wp/vb/member.php?u=1362 buy wellbutrin]] [[http://wc1.worldcrossing.com/WebX/.1de60a2b but ultracet]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=113 paxil online]] [[http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30279 ultracet online]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=229 jazz ringtones]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2863 alprazolam online]] [[http://wc1.worldcrossing.com/WebX/.1de609f4 free mono ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1353 vicodin online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2880 cheap albuterol]] [[http://wc1.worldcrossing.com/WebX/.1de609eb free funny ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=181 free ringtones]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2887 cheap pharmacy online]] [[http://library.cshl.edu/wp/vb/member.php?u=1364 nexium online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=222 vigrx online]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=166 buy ativan]] [[http://library.cshl.edu/wp/vb/member.php?u=1381 free polyphonic ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=180 flexeril online]] [[http://wc1.worldcrossing.com/WebX/.1de609fd punk ringtones]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=102 free midi ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a2c but ultram]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2853 fioricet online]] [[http://students.hsc.unt.edu/housing/item.cfm?type=2899 tracfone ringtones]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=185 cheap hydrocodone]] [[http://library.cshl.edu/wp/vb/member.php?u=1378 sprint ringtones]] [[http://library.cshl.edu/wp/vb/member.php?u=1350 cheap meridia]] [[http://news.engin.brown.edu/forums/thread-view.asp?tid=152 cheap valium]] [[http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=208 phentermine online]] [[http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=349 cheap vicodin]] [[http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=77 free cingular ringtones]] [[http://wc1.worldcrossing.com/WebX/.1de60a0c wellbutrin online]] [[AMX Mod X]] features a greatly enhanced plugin debugger over AMX Mod. If your plugin is giving runtime errors, you should enable the debugger by opening amxmodx/configs/plugins.ini and appending " debug" to your plugin's entry, like so:
+
[[AMX Mod X]] features a greatly enhanced plugin debugger over AMX Mod. If your plugin is giving runtime errors, you should enable the debugger by opening amxmodx/configs/plugins.ini and appending " debug" to your plugin's entry, like so:
  
 
<pre>
 
<pre>

Latest revision as of 09:55, 15 July 2007

AMX Mod X features a greatly enhanced plugin debugger over AMX Mod. If your plugin is giving runtime errors, you should enable the debugger by opening amxmodx/configs/plugins.ini and appending " debug" to your plugin's entry, like so:

myplugin.amxx debug

When you get a runtime error, it will show a full trace of the problem:

L 09/15/2004 - 17:38:17: [AMXX] Run time error 4 (index out of bounds) 
     on line 46 (file "debug.sma").
L 09/15/2004 - 17:38:17: [AMXX] Debug Trace =>
L 09/15/2004 - 17:38:17: [AMXX]       [0] Line 40, File "debug.sma"
L 09/15/2004 - 17:38:17: [AMXX]       [1] Line 25, File "debug.sma" 

This type of error is called an AMX run time error - one that occured directly in the plugin interpreter. From this output, we know that this order of events happened:

  1. Line 25 was called in debug.sma
  2. Line 25 jumped to line 40 in debug.sma
  3. Line 40 jumped to line 46 in debug.sma, where an error occured

This specific error is one of the three common errors. It means that an array was improperly indexed, for example:

new array[5]
new x = 500
array[x] = x

Will generate this message. Another common message is AMX_ERR_STACKERR, which means your plugin ran out of memory. The fix for this is to increase the default size from 16KB:

#pragma dynamic 32768 

This will increase the memory allocated to 128KB. The dynamic size is measured in cells, which are four bytes each (eight bytes on AMD64). AMX_ERR_STACKLOW and AMX_ERR_HEAPLOW are similar. The most common error by far is AMX_ERR_NATIVE, which means a native function in the AMX Mod X core signaled an error message.

Native errors are usually caused by some error checking failure on the part of the script programmer. For example, supplying an invalid connection id to an SQL function, or trying to modify the data on a player that doesn't exist. These errors will usually give a more helpful error message along with the call trace, as well as the actual name of the native that failed.