valstr fix problem... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: valstr fix problem... (
/showthread.php?tid=72753)
valstr fix problem... -
OmeRinG - 10.04.2009
EDIT:
The only problem that it was on the bottom of my script.. put it on top and it was fixed...
_________________
I've made this small function in the bottom of my script:
pawn Код:
stock valstr_fix(val) { new str[10]; valstr(str,val); return str; }
#define valstr valstr_fix
but when I try to use the function like this:
pawn Код:
if(cdval == 0) return GameTextForAll(valstr(cdval),1000,5);
I get error:
pawn Код:
error 035: argument type mismatch (argument 1)
that means valstr_fix does not return string? but it does... I don't get it...
someone help?
Re: valstr fix problem... -
Chaprnks - 10.04.2009
Try putting the define and the function on the top of the script so its defined before it is being called.