09.09.2012, 14:38
hello, i want call CallLocalFunction with dynamic variable type...(sry for my bad english)
i tried this code:
but i got 2 errors:
my last chance is 0-8 length formats and 3 type variables with this code:
anyone know a good solution?
i tried this code:
Код:
((form[funcid][0] == 's')?val[0]:(form[funcid][0] == 'f')?floatstr(val[0]):strval(val[0]))
Код:
X\pawno\include\loader.inc(165) : warning 213: tag mismatch X\pawno\include\loader.inc(165) : error 033: array must be indexed (variable "val")
Код:
if(strlen(form[funcid]) == 2) { /* ii ff ss if fi is si fs sf */ if(form[funcid][0] == 'i' && form[funcid][1] == 'i') { CallLocalFunction(func[funcid],form[funcid],strval(val[0]),strval(val[1])); } else if(form[funcid][0] == 'f' && form[funcid][1] == 'f') { CallLocalFunction(func[funcid],form[funcid],floatstr(val[0]),floatstr(val[1])); } else if(form[funcid][0] == 's' && form[funcid][1] == 's') { CallLocalFunction(func[funcid],form[funcid],val[0],val[1]); } }