HELP needed - 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)
+--- Thread: HELP needed (
/showthread.php?tid=323714)
HELP needed -
oliver12 - 06.03.2012
Hello!
I need some help. Why isn't this code working?(I know it's not in english, but you should understand it anyway):
PHP код:
format(formaat, sizeof(formaat),"2942, %0.f, %0.f, %0.f, %0.f, 0, 0",PangaInfo[i][pangaX],PangaInfo[i][pangaY],PangaInfo[i][pangaZ],PangaInfo[i][pangaA]);
CreateObject(formaat);
error:
PHP код:
error 035: argument type mismatch (argument 1)
AW: HELP needed -
Campbell- - 06.03.2012
Show us where you defined 'formaat'. Aswell check the following site as CreateObject() has a way more parameters.
https://sampwiki.blast.hk/wiki/CreateObject
Re: HELP needed -
Konstantinos - 06.03.2012
You have to strval the numbers and Floatstr for the floats.
Re: HELP needed -
oliver12 - 06.03.2012
Dwane, how I can use variables in CreateObject else than format then?
AW: HELP needed -
Campbell- - 06.03.2012
https://sampwiki.blast.hk/wiki/CreateObject
Just insert your variables instead of numbers.
Example:
pawn Код:
CreateObject(cobject[i][modelid], cobject[i][x], cobject[i][y], cobject[i][z], cobject[i][rotx], cobject[i][roty], cobject[i][rotz], cobject[i][drawdis]);