26.12.2010, 13:01
Code:
TestArg(2, 3);
pawn Code:
stock TestArg(...)
{
printf("%i %i", getarg(0, 0), getarg(1, 0));
}
Code:
TestArg("FirstString", "2ndString");
?
TestArg(2, 3);
stock TestArg(...)
{
printf("%i %i", getarg(0, 0), getarg(1, 0));
}
TestArg("FirstString", "2ndString");
%i (integr)
%s (Text)
%f (float)
%d (integr)
stock TestArg(...)
{
for(new i; i != numargs(); ++i)
{
new
string[32]
;
for(new x; getarg(i, x) != 0; ++x)
{
string[x] = getarg(i, x);
}
printf("Arg %d: %s", string);
}
return ;
}
TestArg("FirstString", "2ndString");
Arg 0: FirstString Arg 1: 2ndString
pawn Code:
pawn Code:
Code:
Arg 0: FirstString Arg 1: 2ndString |