16.04.2012, 16:48
Hi, my problem is i need to copy a string from a variadic function. I will post an example of what i mean.
This code is obviously bugged i know that, it should make clear what i want to do though (i hope).
The real reason i want to know how to do this is; I'm creating a function that builds SQL queries.
This code is obviously bugged i know that, it should make clear what i want to do though (i hope).
pawn Код:
foo( ... )
{
new
ch,
idx,
szBuffer[ 64 ],//this would be the query in my code
iArgs = numargs()
;
for( new i = 0; i < iArgs; ++i )
{
for( ;; )
{
szBuffer[ idx ] = getarg( i , idx );//how to turn this result into a char
if( szBuffer[ idx ] == EOS )
{
idx = 0;
break;
}
idx++;
}
}
}