Creating a function [ Need help ]
#1

How would i make an function with optional parameters?

pawn Код:
forward Scm(playerid, color, Message[], OPTIONAL PARAMETER HERE);
public Scm(playerid, color, Message[], OPTIONAL PARAMETER HERE)
{
     return 1;
}
Reply
#2

Assign the param a value like
pawn Код:
Scm(playerid, color, Message[], OPTIONAL_PARAMETER = 1)
Then if you dont enter it its 1 anway.
Reply
#3

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Assign the param a value like
pawn Код:
Scm(playerid, color, Message[], OPTIONAL_PARAMETER = 1)
Then if you dont enter it its 1 anway.
Yeah ofc! thanks!
Reply
#4

Your welcome i was wondering this myself the other day and looked at some includes thats why the fast reply lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)