Raised This Month: $12 Target: $400
 3% 

[TUT] Reducing annoyance when testing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alerad
Junior Member
Join Date: Mar 2016
Old 10-29-2018 , 22:29   [TUT] Reducing annoyance when testing
Reply With Quote #1

I've just had a good idea, probably someone came up with this already at some point but I thought it would be good to share this.

I'm using a good combo of plugins to make my plugin auto-compile and reload when I hit CTRL+S

Here's the combo in case anyone is interested:

https://forums.alliedmods.net/showthread.php?t=106320 -- Autoreload by Timiditas
http://atom.io -- Atom Text Editor
https://atom.io/packages/on-save -- on-save (plugin)

Once you download and install each of these, create a file named .on-save.json on your projects root directory and add the following config:

Code:
[
  {
    "files": "**/*.sp",
    "command": "C:\\location\\to\\spcomp C:\\location\\to\\plugin.sp -o\"C:\\location\\to\\server\\plugins\""
  }
]
The double bars are to escape inside of the json string.

Hope this helps someone!
alerad is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-30-2018 , 10:55   Re: [TUT] Reducing annoyance when testing
Reply With Quote #2

[batch] sm plugins ftp uploader
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 10-30-2018 , 11:04   Re: [TUT] Reducing annoyance when testing
Reply With Quote #3

I save too often to have compilable code when I actually save. I just use Notepad++'s Run program part to compile when I do a shortcut and drops the plugin into my srcds location.
Mitchell is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-30-2018 , 14:46   Re: [TUT] Reducing annoyance when testing
Reply With Quote #4

I prefer writing it the way it almost always compile without errors during modifications, rather than trying to find where is error. On earlier stage it's simplier to find misprint. Further, compiler sometimes show error that is not always point to actual error or the real error is somewhere in the middle of a large error log.

Besides, Ctrl + S => immediate upload give you opportunity to see in-game changes immediately, if plugin supports hard-loading.
Previously, I also was thinking it's superfluous. But after configuring everything, my debugging became several times faster.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 10-30-2018 at 14:52.
Dragokas is offline
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 15:54.


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