Raised This Month: $ Target: $400
 0% 

Trouble shooting. For larger plugins.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Timmi the savage
Senior Member
Join Date: Jul 2004
Location: seattle
Old 01-07-2005 , 07:38   Trouble shooting. For larger plugins.
Reply With Quote #1

I was having such difficulties with trouble shooting and finding problems.

Now for the most part, I rarely have problems with Amx ModX, lately with the recent developement of Amx Modx and some function changes / additions. I am finding myself tearing old plugins apart and changing whatever was necessary.

On some plugins. / Larger plugins / I would make

A. a mistake or mistype
B. Invalid function call or argument
Rather often.

So in order to COMBAT the cascading problems I would have, I was forced into a change.
Timmi the savage is offline
Send a message via Yahoo to Timmi the savage
Timmi the savage
Senior Member
Join Date: Jul 2004
Location: seattle
Old 01-07-2005 , 07:45  
Reply With Quote #2

I found myself in a fluster of problems and mismatches.

The Idea came to me when reading through
" Battle Mages " -- an amxmodx plugin.

I saw how the author used " Multiple Include Files "

So your plugin is 4000 lines plus.

You either made a large change in several functions , added new functions, or just need to update it.

Split it up into " Sections " and save them into the include dir as an include.

For example :

If your plugin saves anything. Make a saving include with all the information included in it.

If you Plugin has skills or classes. Make that its own include it will make it easier to update and change.

If you have a lot of menu's : Make a menu's include Put them all in there

.....

You can even place all of your variables into an include.
Timmi the savage is offline
Send a message via Yahoo to Timmi the savage
Timmi the savage
Senior Member
Join Date: Jul 2004
Location: seattle
Old 01-07-2005 , 07:48  
Reply With Quote #3

The ONLY PROBLEM that can arise

If you include them in the wrong order.

For example

Code:
#include <menus>
#include <skills>
#include <variables>
will crash.

since variables will allways need to be before anything else.

Now if your menu's call a <skills> function then <skills> would need to be above <menus>.
Timmi the savage is offline
Send a message via Yahoo to Timmi the savage
Timmi the savage
Senior Member
Join Date: Jul 2004
Location: seattle
Old 01-07-2005 , 07:50  
Reply With Quote #4

The reason this will help you in troubleshootin faster and easier is.

if you have a compiler error you can comment out an include to find out which one is causing it.

also this will make accessing sections of you code easier.
so your only seeing what is pertainent to your problem.
Timmi the savage is offline
Send a message via Yahoo to Timmi the savage
Timmi the savage
Senior Member
Join Date: Jul 2004
Location: seattle
Old 01-07-2005 , 07:52  
Reply With Quote #5

If you have a programming interface
or mark up editor dont worry about this.

IF YOU ARE USING NOTEPAD... dont.

If you need a good and free editor.

User crimson editor.
Timmi the savage is offline
Send a message via Yahoo to Timmi the savage
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-07-2005 , 15:53  
Reply With Quote #6

Why did you make 1 topic and 4 replies when all you needed was one topic? Perhaps you have ADD or something?

P.S. Notepad is awesome.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Timmi the savage
Senior Member
Join Date: Jul 2004
Location: seattle
Old 01-08-2005 , 06:59  
Reply With Quote #7

Quote:
Originally Posted by XxAvalanchexX
Why did you make 1 topic and 4 replies when all you needed was one topic? Perhaps you have ADD or something?

P.S. Notepad is awesome.
Yes. Add.
Timmi the savage is offline
Send a message via Yahoo to Timmi the savage
BlueRaja
Senior Member
Join Date: Nov 2004
Old 01-09-2005 , 10:59  
Reply With Quote #8

...
Wait, are you saying that you used a header to hold all your global variables? O_o
And that - lmfao - it wouldn't work if you included them in the wrong order?

Look up the technique known as "single-file inclusion." Works wonders, it really does.


Quote:
Originally Posted by XxAvalanchexX
Why did you make 1 topic and 4 replies when all you needed was one topic? Perhaps you have ADD or something?
Quote:
Originally Posted by Timmi the savage
Yes. Add.
Not Add. ADD.


PPS. Notepad rulez you.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
LynX
Veteran Member
Join Date: Oct 2004
Old 01-10-2005 , 11:05  
Reply With Quote #9

Notepad here, too. Crimson Editor just doesn't have that "feeling" when you complete plugin.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Reply


Thread Tools
Display Modes

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 -4. The time now is 19:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode