Raised This Month: $ Target: $400
 0% 

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
BAILOPAN
Join Date: Jan 2004
Old 02-26-2015 , 14:34   Re: New API and Syntax
Reply With Quote #391

Quote:
Originally Posted by WildCard65 View Post
hey Bailopan, what's plans for the SourcePawn VM? Is it to prepare for structs? classes? Anything you reserved in 1.7?
Replacing code that was written in 2006.
__________________
egg
BAILOPAN is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 02-26-2015 , 15:27   Re: New API and Syntax
Reply With Quote #392

Quote:
Originally Posted by ClassicGuzzi View Post
Thanks for the help

Quick question Bailopan, what will happen with tags like TFClassType and TFCond on the new syntax?

By the way, I'm so happy because I just found out that the key values got the methodmaps treatement, for some reason I find it really cool/easy to use them now.

Also, is it ok to use view_as to transform integers into bools?
PHP Code:
g_hud_show view_as<bool>kv.GetNum("ShowHud",0); 
view_as is not a cast, it just a retag. It would be the same as Bool:kv.GetNum("ShowHud",0); in the old language. There is nothing wrong it with, so yes you can but you can already use a int as a bool in conditions if that what you need it for. 0 = false, anything else = true

Quote:
Originally Posted by BAILOPAN View Post
INVALID_HANDLE isn't a #define. It's a typed enumeration value.

null is a special intrinsic value that coerces to any nullable type. A null value means "there is no value here" and attempting to use the value will result in an exception.
Thank you for the clarification ;)

Last edited by Mathias.; 02-26-2015 at 15:29. Reason: added smiley ;)
Mathias. is offline
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Old 03-03-2015 , 22:02   Re: New API and Syntax
Reply With Quote #393

#assert GGAMETYPE == DONTCOMPILE

SOURCEMOD_VERSION "1.7.1-dev+5161" continues to try and compile after it sees that this fails, in sourcemod 1.6 or before, it will just skip the file and move on.

Is there an alternative method usable in Sourcemod 1.7?
__________________
El Diablo War3Evo is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-03-2015 , 22:50   Re: New API and Syntax
Reply With Quote #394

If you look at any include file, you'll see that #endinput is a thing that exists.
__________________
asherkin is offline
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Old 03-03-2015 , 23:24   Re: New API and Syntax
Reply With Quote #395

Quote:
Originally Posted by asherkin View Post
If you look at any include file, you'll see that #endinput is a thing that exists.

nevermind - i wrote something out.. but didn't notice what i was saying

It was so much easier to use #assert .. now i have to change a bunch of code
__________________

Last edited by El Diablo War3Evo; 03-03-2015 at 23:26.
El Diablo War3Evo is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 03-06-2015 , 22:49   Re: New API and Syntax
Reply With Quote #396

Hey guys,

I'm loving datamaps and have been playing with them lots

I'm wondering if there are plans for classes / structures in sourcepawn and if so: how likely it is for them to be introduced in the near future?
__________________
Neuro Toxin is offline
BAILOPAN
Join Date: Jan 2004
Old 03-07-2015 , 01:02   Re: New API and Syntax
Reply With Quote #397

Winter is coming.
__________________
egg
BAILOPAN is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 03-07-2015 , 09:34   Re: New API and Syntax
Reply With Quote #398

Quote:
Originally Posted by BAILOPAN View Post
Winter is coming.
Next winter eh?
are structs gonna be sourcemod's christmas gift? ヽ༼ຈل͜ຈ༽ノ
__________________
nergal is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 03-08-2015 , 12:08   Re: New API and Syntax
Reply With Quote #399

I have two questions.
1. Is this really supposed to return an int?
2. Can someone enlighten me on why this is giving me an "function prototypes do not match" error?
Spoiler
__________________
Impact123 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-08-2015 , 12:09   Re: New API and Syntax
Reply With Quote #400

Quote:
Originally Posted by Impact123 View Post
I have two questions.
1. Is this really supposed to return an int?
2. Can someone enlighten me on why this is giving me an "function prototypes do not match" error?
Spoiler
PHP Code:
typedef NativeCall = function int(Handle pluginint numParams); 
__________________
WildCard65 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 14:01.


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