Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

Today I learned - Share your newly found knowledge!

Credits for the concept of this thread go to Slice.

ID
d6ouivfilegovhg7b6m0
author
kristo's avatar

kristo

@kristo


View profile
Copy link
  Report member
started
Apr 17, 2019
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
Today I learned - Share your newly found knowledge!
kristo's avatar

kristo

@kristo


View profile
Copy link
  Report member
• 7y
Pawn Scripting

Today I learned - Share your newly found knowledge!

pawn

Credits for the concept of this thread go to Slice.

Slice said:
Simple.?If you learned something new?related to SA-MP scripting, share it here!

Please:


  • Explain what it is you learned, don't just say you learned something.?<----

  • Try keeping it concise.

  • Don't post stupid pictures or otherwise annoying, non-related stuff.

  • Don't link to or quote posts then say you learned that.




Today I learned that natives can be forwarded and this can be used to deprecate natives and add replacements for them without getting a deprecation warning inside the replacement function:

forward DeprecatedNative();

stock NewFunction()
{
? ?return DeprecatedNative(); // no warning here
}

#pragma deprecated Use `NewFunction` instead.
native DeprecatedNative();

main()
{
? ?DeprecatedNative(); //?(warning) function is deprecated (symbol "DeprecatedNative") Use `NewFunction` instead.
? ?NewFunction();
}
0 likes0 replies

    Please sign up or log in to reply