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

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
splewis
Veteran Member
Join Date: Feb 2014
Location: United States
Old 08-07-2016 , 21:49   Re: New API and Syntax
Reply With Quote #741

Quote:
Originally Posted by Marcus101RR View Post
Can someone guide me to the 1.8 Syntax/Guide because I get over 100 Warnings/Errors now.

Just read the warnings. One says FCVAR_PLUGIN is useless, so that's one warning. The fix is to remove it.

Another is that FindDataMapOffs is deprecated, prefer using FindDataMapInfo instead.
__________________
splewis is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-07-2016 , 21:57   Re: New API and Syntax
Reply With Quote #742

Replace FCVAR_PLUGIN with 0. (I think?)

If you want to suppress the rest of the warnings, then there is some flag you can pass to spcomp that will not emit warnings that you can use.
Potato Uno is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 08-07-2016 , 22:56   Re: New API and Syntax
Reply With Quote #743

replace "FCVAR_PLUGIN" with "FCVAR_NONE"
__________________
nergal is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 08-20-2016 , 15:39   Re: New API and Syntax
Reply With Quote #744

if it's not already in the TODO: list.
can I request that null be used for any type?
if null must stay for handles, can there at least be one that conforms for all non-handle types?

else I'll have to do this...
PHP Code:
#define SPNULL   view_as< any >(0) 
__________________
nergal is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-20-2016 , 16:03   Re: New API and Syntax
Reply With Quote #745

Setting an integer or float to null makes no sense at all, it's just not valid. null is a valid state for any nullable type, not just Handle.
__________________
asherkin is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 08-20-2016 , 18:54   Re: New API and Syntax
Reply With Quote #746

Quote:
Originally Posted by asherkin View Post
Setting an integer or float to null makes no sense at all, it's just not valid. null is a valid state for any nullable type, not just Handle.
I know but there's more types than int and float and it's kinda a pain that I need to view_as those custom types just to set them to zero.

it's not just for enumerated types either but all non-nullable, custom methodmap types as well.
__________________

Last edited by nergal; 08-20-2016 at 19:07.
nergal is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 08-21-2016 , 14:28   Re: New API and Syntax
Reply With Quote #747

Quote:
Originally Posted by nergal View Post
I know but there's more types than int and float and it's kinda a pain that I need to view_as those custom types just to set them to zero.

it's not just for enumerated types either but all non-nullable, custom methodmap types as well.
thats what you get
now take your new syntax and struggle with it.
or just use the old...
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-21-2016 , 18:00   Re: New API and Syntax
Reply With Quote #748

well they could just add the nullable thing back O__O
Miu is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-21-2016 , 18:08   Re: New API and Syntax
Reply With Quote #749

Quote:
Originally Posted by Miu View Post
well they could just add the nullable thing back O__O
nullable hasn't gone anywhere.
__________________
asherkin is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 08-21-2016 , 19:55   Re: New API and Syntax
Reply With Quote #750

right but it doesn't seem to do anything, at least it doesn't actually make the methodmap nullable
Miu 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 00:59.


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