This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Polymorphism Function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 01-24-2022 , 10:39   Re: Polymorphism Function
Reply With Quote #2

SourcePawn is not like C++ (the only similarity is probably syntax) and other OOLs.
There can be only one function L4D2_SpawnInfected with only one prototype.

You can define typesets (a set of typedefs with one name and typedef is not the same as in C/C++) but they're used as callbacks and you have to handle (choose which one to use in different cases) them manually.

About typeset and typedef: https://wiki.alliedmods.net/SourcePa...yntax#Typedefs
An example of typedef: https://wiki.alliedmods.net/Function...ivate_Forwards
__________________
MAGNAT2645 is offline
 



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 01:21.


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