Any possible way of returning an array on public function?
#1

Fixed!
Reply
#2

Pass it as argument to the function.
pawn Код:
stock myArrayFunc(array[], size = sizeof array)
{
    format(array, size, "This is a %s with the number %d", "string", 7);
}
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Pass it as argument to the function.
pawn Код:
stock myArrayFunc(array[], size = sizeof array)
{
    format(array, size, "This is a %s with the number %d", "string", 7);
}
I want to return it.
Reply
#4

Public functions in fact cannot return arrays, so the only way to do is to pass the argument by reference.
Код:
error 090: public functions may not return arrays
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
Public functions in fact cannot return arrays, so the only way to do is to pass the argument by reference.
Код:
error 090: public functions may not return arrays
Fixed using GVar.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)