Function overload
#1

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

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

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> {}
Reply
#4

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?
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)