SA-MP Forums Archive
Function overload - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Function overload (/showthread.php?tid=569476)



Function overload - Baltazar - 30.03.2015

Hi; It's possible to code function overloads in C++. How do I do this in Pawn?


AW: Function overload - Kaliber - 31.03.2015

This Tutorial could help you: https://sampforum.blast.hk/showthread.php?tid=86850


Re: Function overload - Baltazar - 31.03.2015

I am not too sure... can I declare two functions that accept different arguments using automaton? Example:

stock SortArray(array[]) <MyState:one> {}
stock SortArray(array[][]) <MyState:two> {}


Re: Function overload - Baltazar - 31.03.2015

Man, I've just read your tutorial ( https://sampforum.blast.hk/showthread.php?tid=445478 ) on y_playerset. How did you do that? I mean functions accepting different arguments, like numbers and arrays of numbers. What's the secret behind this?


Re: Function overload - Baltazar - 01.04.2015

Quote:
Originally Posted by ******
Посмотреть сообщение
I just linked you to the file.
Sad you haven't documented somewhere the method itself. Gonna read the code then. Thanks, man