Pawn function argmunent help
1- How to pass a two dimensional array to a stock or function
2- How to Make a stock or function with optional argument Like , i have a stock or function ( or wat ever u called it as) , abc(type,amount) and here amount should be optional , i mean ,i dont want to pass in few cases and vice versa 3- Can someone list all types of argument that can be made with a function / stock |
Re: Pawn function argmunent help
Code:
Not really sure what you mean by #3 but there are 3 types of data. Float, boolean and integers. Everything else is one of the previous with a custom tag to prevent misuse. In other words, you can pass anything. |
Re: Pawn function argmunent help
#1 if i want to add a optional argument to my functions , and actually it should be a string , then how to do that?
#2 How to make optional argument which is multiple dimensional array for a function / stock |
Re: Pawn function argmunent help
There's probably an easier way to do the multi-dimensional array but I can't figure it out.
This only works with a multi-dimensional array that have a predetermined size at the top level and mid level. If you increase the array size on either of them it will fail on compilation. Bug? No idea. It may be easier to use a dynamic native. But either way you have to pass the size of the array to the subfunction. Code:
|
| All times are GMT -4. The time now is 09:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.