Raised This Month: $99 Target: $400
 24% 

TOGs SourcePawn Syntax Converter [MS Excel Based for now]


Post New Thread Reply   
 
Thread Tools Display Modes
nergal
Veteran Member
Join Date: Apr 2012
Old 05-14-2017 , 03:06   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #31

Quote:
Originally Posted by ThatOneGuy View Post
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/
I meant a python transcompiler that converts old sp to new syntax.
__________________
nergal is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 05-14-2017 , 06:09   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #32

Quote:
Originally Posted by nergal View Post
I meant a python transcompiler that converts old sp to new syntax.
Well, if such a thing is out there, it would be nice to be made available to others. If you're proposing I develop it, again, I dont know python (yet), and would encourage you to develop it if that is your idea. I'm still leaning towards php with the code made open source, as then it can be utilized on the web by anyone, anywhere, with no need to install anything to run the tool.

Side Note: Perhaps someone can get me started with the right setup for coding/compiling scripts in Python. I've installed python 3.5 in the past and read several tutorials to learn the language....seems pretty straight forward....but I couldnt figure out what I was doing in the software and wasnt committed enough to spend forever looking for tutorials on how to compile, etc. Every tutorial I did find looked nothing like what I was looking at on my screen or had options that I was missing, etc. So, I dropped it for the time.
__________________
ThatOneGuy is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 05-15-2017 , 02:35   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #33

Quote:
Originally Posted by ThatOneGuy View Post
Well, if such a thing is out there, it would be nice to be made available to others. If you're proposing I develop it, again, I dont know python (yet), and would encourage you to develop it if that is your idea. I'm still leaning towards php with the code made open source, as then it can be utilized on the web by anyone, anywhere, with no need to install anything to run the tool.

Side Note: Perhaps someone can get me started with the right setup for coding/compiling scripts in Python. I've installed python 3.5 in the past and read several tutorials to learn the language....seems pretty straight forward....but I couldnt figure out what I was doing in the software and wasnt committed enough to spend forever looking for tutorials on how to compile, etc. Every tutorial I did find looked nothing like what I was looking at on my screen or had options that I was missing, etc. So, I dropped it for the time.
Python isn't compiled, but rather interpreted. I use Pycharm as my IDE and it works out of the box well
headline is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 05-15-2017 , 19:34   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #34

Quote:
Originally Posted by Headline View Post
Python isn't compiled, but rather interpreted. I use Pycharm as my IDE and it works out of the box well
Nice. I've tried visual studio and the default install from python.org, and ran into the roadblocks mentioned (and didnt care enough at the time to work too hard to resolve the issues). I'll look into pycharm though!
__________________

Last edited by ThatOneGuy; 05-15-2017 at 19:34.
ThatOneGuy is offline
T1MOXA
Member
Join Date: Aug 2016
Old 07-10-2017 , 10:03   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #35

Error when converting https://forums.alliedmods.net/showthread.php?t=71867


Last edited by T1MOXA; 07-10-2017 at 10:04.
T1MOXA is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 07-11-2017 , 00:17   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #36

Quote:
Originally Posted by T1MOXA View Post
Thanks for the feedback! I just patched this for you. Try the new version (1.1.6) in the OP.

Note: The processor doesnt handle splitting lines into multiple when multiple variable types are declared and the default values are set in the same line. This plugin has an instance of that. After fixing that, some view_as<>() stuff, and the AskPluginToLoad2 function, this is what I got.
Attached Files
File Type: sp Get Plugin or Get Source (sm_regexfilter newsyntax.sp - 122 views - 11.6 KB)
File Type: smx sm_regexfilter newsyntax.smx (11.0 KB, 60 views)
__________________
ThatOneGuy is offline
envynz
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 07-12-2017 , 00:28   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #37

How in the world do you even get this too work?
envynz is offline
T1MOXA
Member
Join Date: Aug 2016
Old 07-12-2017 , 10:03   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #38

@ThatOneGuy Thanks!

Last edited by T1MOXA; 07-12-2017 at 10:04.
T1MOXA is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 07-12-2017 , 23:59   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #39

Quote:
Originally Posted by T1MOXA View Post
@ThatOneGuy Thanks!
Your welcome!

Quote:
Originally Posted by SnowTigerVidz View Post
How in the world do you even get this too work?
It is a Microsoft Excel based tool for now. All you need to do to use it is:
  1. Open the tool. If there is a yellow bar at the top asking if you want macros enabled, say yes (that allows the code to run). If there is a dialogue asking if ActiveX should run, say yes. This allows the button to work, though you could say no and run the code directly from the VBA window.
  2. Make sure your include path is set. The includes arent edited, but are used to define variable types, natives, forwards, etc.
  3. Click the button, and find the .sp file you want converted, and click ok.
  4. The file will now be processed. The original file is left as is, and the new one is in the same location and has the text " newsyntax" added to the end. After this, the tool is done.
  5. After processing, you will see the following at the top of the code:
    PHP Code:
    /* put the line below after all of the includes!
    #pragma newdecls required
    */ 
    Move the line of code (#pragma newdecls required) to be just past the last inlude. I may automate this step in the future as well.
  6. Make final edits for anything not handled by the processor (see original post for what all that is) until it compiles.
__________________

Last edited by ThatOneGuy; 07-13-2017 at 00:01.
ThatOneGuy is offline
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 07-14-2017 , 18:42   Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
Reply With Quote #40

Cool! Thank you.
__________________
vortex. 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 01:40.


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