Raised This Month: $170 Target: $400
 42% 

TOGs SourcePawn Syntax Converter [MS Excel Based for now]


Post New Thread Reply   
 
Thread Tools Display Modes
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-14-2017 , 02:40   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #21

A php site would be nice
__________________
Neuro Toxin is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 02-14-2017 , 15:21   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #22

Yes, a PHP site would indeed be wonderful. Upload source code, convert. Problem is, someone could set the site up to harvest any source code entered into it which would mean bad things for private plugins that are entered in.
__________________
I'm not a SourcePawn expert, I just play one on TV.
Want to join the SourceMod Discord server? Click here!

404UNF is offline
Headline
SourceMod Moderator
Join Date: Mar 2015
Old 02-14-2017 , 15:27   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #23

Quote:
Originally Posted by abrandnewday View Post
You can make Notepad++ plugins too. Notepad++ can also run scripts though I'm not sure what language the scripts use.

Not sure why something couldn't be made in the format of one of those two options.
I mean, online compilers probably do that anyway lol
Just keep the php site open source, and no problem

Last edited by Headline; 02-14-2017 at 15:28.
Headline is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-14-2017 , 15:40   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #24

Or use Javascript instead.
__________________
Neuro Toxin is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 02-14-2017 , 16:48   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #25

Quote:
Originally Posted by Headline View Post
I mean, online compilers probably do that anyway lol
Just keep the php site open source, and no problem
S'why I don't use online compilers. I keep a "clean" (unmodified) SourceMod install in a folder with new syntax-updated versions of many includes from these forums (updated by me, added for compatibility so I can compile things with custom includes) that I use for compiling my own plugins. Drag and drop the .sp file on compile.exe for a "test" compile so I can check for errors (because compile.exe's console window stays up). If I know something is fine, I'll drop it onto spcomp.exe for a speedy compile with no console window just to generate the .smx file in the same folder (another nice benefit, doesn't put them in /scripting/compiled).
__________________
I'm not a SourcePawn expert, I just play one on TV.
Want to join the SourceMod Discord server? Click here!


Last edited by 404UNF; 02-14-2017 at 16:48.
404UNF is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 02-15-2017 , 09:09   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #26

Quote:
Originally Posted by abrandnewday View Post
S'why I don't use online compilers. I keep a "clean" (unmodified) SourceMod install in a folder with new syntax-updated versions of many includes from these forums (updated by me, added for compatibility so I can compile things with custom includes) that I use for compiling my own plugins. Drag and drop the .sp file on compile.exe for a "test" compile so I can check for errors (because compile.exe's console window stays up). If I know something is fine, I'll drop it onto spcomp.exe for a speedy compile with no console window just to generate the .smx file in the same folder (another nice benefit, doesn't put them in /scripting/compiled).
You could instead use Notepad++ to compile for you (since you already mentioned you use it). Install the NPPExec addon from the plugin manager. Follow instructions here: https://forums.alliedmods.net/showpo...&postcount=164

With NPP doing the compiling, it will stay in the NPP console and you can double click the error/warning to go straight to the line it came from. Then, map the macro to a shortcut key. So, when all is said and done, I press ctrl+shift+b to compile a script that is anywhere and the .smx will appear next to it in the same folder. Note: The includes will need to be in the include folder relative to your compiler path.

Currently, I run this script to compile:
Spoiler


I used to run a simpler script but found that on windows, pseudo mapped locations (through vsubst) seemed to add an extra slash, where it didnt for full paths. So, hence the checking for the slash at the end before adding it.

-----------------------------------------------

As far as converting the whole thing to PHP, I was planning on doing it some time, but am too busy until around April, so it likely wouldnt happen until then. As far as exporting the code for you:


When April comes around, I'll check back in on this, unless someone else beats me to it. Perhaps we can get a github repo going with a PHP or java version created.
__________________
ThatOneGuy is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 02-15-2017 , 11:51   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #27

Quote:
Originally Posted by ThatOneGuy View Post
You could instead use Notepad++ to compile for you (since you already mentioned you use it). Install the NPPExec addon from the plugin manager. Follow instructions here: https://forums.alliedmods.net/showpo...&postcount=164

With NPP doing the compiling, it will stay in the NPP console and you can double click the error/warning to go straight to the line it came from. Then, map the macro to a shortcut key. So, when all is said and done, I press ctrl+shift+b to compile a script that is anywhere and the .smx will appear next to it in the same folder. Note: The includes will need to be in the include folder relative to your compiler path.

Currently, I run this script to compile:
Spoiler
So do I except I modified mine ages ago and shrunk it down after removing useless shit. Should've noted that drag & drop was my OLD method until I started using that script about....fuck I forget when, it's been a while.
Spoiler
__________________
I'm not a SourcePawn expert, I just play one on TV.
Want to join the SourceMod Discord server? Click here!

404UNF is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 02-15-2017 , 20:58   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #28

Quote:
Originally Posted by abrandnewday View Post
So do I except I modified mine ages ago and shrunk it down after removing useless shit. Should've noted that drag & drop was my OLD method until I started using that script about....fuck I forget when, it's been a while.
Yup...that is what mine looked like until recently when my vsubst drives were causing the path to have a double / near the end if in root mapped folder of the vsubst "drive". For 98% of users out there, the shorter version is all that is needed.
__________________
ThatOneGuy is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 05-13-2017 , 20:22   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #29

why not just a transcompiler written in Python?
__________________
nergal is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 05-13-2017 , 20:51   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #30

Quote:
Originally Posted by nergal View Post
why not just a transcompiler written in Python?
Firstly because I didnt know VBA -> Python translators exist (though I just looked and there is one). Secondly, because I have only learned basic python and have issues getting the proper tools set up to even utilize python. Also, then I assume you couldnt make a web based program for converting? Good idea though...would you be willing to take that on? I found this one here: http://vb2py.sourceforge.net/
__________________

Last edited by ThatOneGuy; 05-13-2017 at 21:05.
ThatOneGuy 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 13:24.


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