SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/03/2012, 05:31 PM   #1
Zeex_
Guest
 
Posts: n/a
Default Mark deprecated natives with #pragma deprecated

This way people will be warned about deprecated natives at compile time rather than run time:

Code:
warning 234: function is deprecated (symbol "AllowAdminTeleport")
To mark native as deprecated you need to put #pragma deprecated before native declaration:

pawn Code:
#pragma deprecated
native AllowAdminTeleport(allow);
  Reply With Quote
Old 26/03/2012, 05:35 PM   #2
T0pAz
Guest
 
Posts: n/a
Default Re: Mark deprecated natives with #pragma deprecated

Just mentioned on this tutorial.
  Reply With Quote
Old 26/03/2012, 09:01 PM   #3
playbox12
High-roller
 
playbox12's Avatar
 
Join Date: Feb 2010
Location: Netherlands
Posts: 1,318
Reputation: 216
Default Re: Mark deprecated natives with #pragma deprecated

Quote:
Originally Posted by T0pAz View Post
Just mentioned on this tutorial.
Your point?
playbox12 is offline   Reply With Quote
Old 26/03/2012, 09:05 PM   #4
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,230
Reputation: 993
Default Re: Mark deprecated natives with #pragma deprecated

He means Kalcor should do this with AllowAdminTeleport and AllowPlayerTeleport, and I agree.
__________________
Click banner above for more info. View trailers here.
Enter referral code SAMPFORUM after registering for a $5000 starting bonus!
MP2 is offline   Reply With Quote
Old 27/03/2012, 09:48 AM   #5
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,801
Reputation: 375
Default Re: Mark deprecated natives with #pragma deprecated

Good idea, AttachPlayerObjectToPlayer also, and other removed old functions.
__________________


IstuntmanI is offline   Reply With Quote
Old 27/03/2012, 06:18 PM   #6
Meta
Gangsta
 
Meta's Avatar
 
Join Date: Feb 2010
Posts: 624
Reputation: 47
Default AW: Mark deprecated natives with #pragma deprecated

But why the heck do you use them then?
Not used -> No error message
Meta is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SA-MP server crash - AllowPlayerTeleport() : function is deprecated. Please see OnPlayerClickMap() Ouch_Charlie Client Support 0 02/12/2011 12:12 PM
sscanf warning: Strings without a length are deprecated, please add a destination size. HayZatic Help Archive 5 08/07/2011 07:26 PM
Natives GaGlets(R) Help Archive 0 01/08/2010 03:45 AM


All times are GMT. The time now is 10:59 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.