I decided that only integers and strings would be fine, so I tried this. It sort of works, except that the "getarg(i-1,1)" check comes back true for integers. I think that it's dipping into other memory, because when I use two separate integers they both result in the same string being formed. Are there any other ways to differentiate between a string and an int that you know of?
Code:
public func_native_handler(a,b,c[],{Float,Sql,Result,_}:...)
{
param_convert(3);
static funcid;
if(!funcid) funcid = get_func_id("func");
callfunc_begin_i(funcid);
callfunc_push_int(a);
callfunc_push_int(b);
callfunc_push_str(c);
static buildString[128];
new i, j, argnum = numargs();
for(i=4;i<=argnum;i++)
{
param_convert(i);
if(getarg(i-1,1))
{
j = 0;
while(getarg(i-1,j))
{
buildString[j] = getarg(i-1,j);
j++;
}
buildString[j] = 0; // finish string
callfunc_push_str(buildString);
}
else callfunc_push_int(getarg(i-1));
}
callfunc_end();
}
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS