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

RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: Object-Browser/Translations


Post New Thread Reply   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-15-2015 , 16:25   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #61

Quote:
Originally Posted by _AeonOne_ View Post
So, the AND operator is a little bit problematic.
Following operators are able:
Code:
word &word;  //addressof
word & word;  //bitwise and
word &= word; //binary and + assign
word && word; //binary and
it's a very tough task to determine between addressof and bitwise int.
SourcePawn doesn't have a unary & operator (addressof), so there shouldn't be any problem.
Anywhere in a function body there should be a space after &, and anywhere in a function parameter list there should be no space after &.
__________________
asherkin is offline
_AeonOne_
Member
Join Date: Nov 2012
Location: Berlin, Germany
Old 04-16-2015 , 07:26   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #62

Quote:
Originally Posted by asherkin View Post
SourcePawn doesn't have a unary & operator (addressof), so there shouldn't be any problem.
Anywhere in a function body there should be a space after &, and anywhere in a function parameter list there should be no space after &.
Exactly, and there is the problem.
The simple Stringtokenizer i've written for the Reformatter isn't context aware.
I'am planning to wtite a full sourcepawn Tokenizer+Lexer (for really cool things like, life code analyzing,
Refactoring, pre-compile optimizing, snippet/function inlining etc.) which will also power the reformatter.
But thats for a more or less far future because i have to concentrate on studying for the next months.
_AeonOne_ is offline
necavi
Veteran Member
Join Date: Sep 2010
Old 04-16-2015 , 11:19   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #63

Unfortunately the lack of context makes it so that it positively destroys SQL query strings, if you terminate them with a semicolon. I've had to turn it off because of that. It removes spaces from between, say, SELECT * FROM `table` WHERE 1; becomes SELECT * FROM`table`WHERE 1; or something similar.
necavi is offline
_AeonOne_
Member
Join Date: Nov 2012
Location: Berlin, Germany
Old 04-17-2015 , 13:50   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #64

Quote:
Originally Posted by necavi View Post
Unfortunately the lack of context makes it so that it positively destroys SQL query strings, if you terminate them with a semicolon. I've had to turn it off because of that. It removes spaces from between, say, SELECT * FROM `table` WHERE 1; becomes SELECT * FROM`table`WHERE 1; or something similar.
Uhhrgg yes this is bad behaviour.
You could workaround this. Just finish the string ("") and then write into it. The Reformatter will detect it as a string and leave it how you've written it.
_AeonOne_ is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-17-2015 , 14:05   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #65

Pretty cool.

I ran the installer, but I can't seem to find where it installed to...

Edit: Found it, it installs to appdata.

Is there perhaps a way to change the font size? Everything just feels huge...
__________________

Last edited by Dr. McKay; 04-17-2015 at 14:08.
Dr. McKay is offline
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 04-17-2015 , 14:12   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #66

@Dr. McKay, Tools - Options - Editor - Font Size
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-17-2015 , 15:26   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #67

Quote:
Originally Posted by necavi View Post
Unfortunately the lack of context makes it so that it positively destroys SQL query strings, if you terminate them with a semicolon.
FWIW, you shouldn't really be terminating SQL queries with semicolons in SM, multiple statements are not supported.
__________________
asherkin is offline
necavi
Veteran Member
Join Date: Sep 2010
Old 04-17-2015 , 15:35   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #68

Quote:
Originally Posted by asherkin View Post
FWIW, you shouldn't really be terminating SQL queries with semicolons in SM, multiple statements are not supported.
Hmmm, alright, thanks, I've just done it out of habit from almost every single other SQL engine I've had to use.
necavi is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 04-17-2015 , 18:11   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #69

Ciao,

can you please edit intellisense a little? In Notepad++ I was used to have a nice formated intellisense with highlighted function param hovered by caret.

KissLick is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-18-2015 , 04:06   Re: RELEASE | SPEdit - a lightweight sourcepawn editor - NEW: RCon Querys
Reply With Quote #70

Quote:
Originally Posted by Bara View Post
@Dr. McKay, Tools - Options - Editor - Font Size
I completely missed the tabs at the top. My brain just automatically assumed that "big text" = "title" and ignored it.
__________________
Dr. McKay is offline
Reply



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 09:57.


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