SA-MP Forums Archive
Question about array with strings - 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: Question about array with strings (/showthread.php?tid=422260)



Question about array with strings - horsemeat - 12.03.2013

it give me this warning when I try to compile

Код:
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
Код:
Delete3DTextLabel(blocklabel[editobjnum]);
Create3DTextLabel(Move3DText[editobjnum],PURPLE,fX,fY,fZ);
Solved
I forgot the rest of the code they really should add better syntax highlighting

Код:
Create3DTextLabel(Move3DText[editobjnum],PURPLE,fX,fY,fZ,5.0,0,0);
I also for to add...
Код:
Delete3DTextLabel(blocklabel[editobjnum]);
blocklabel[editobjnum] = Create3DTextLabel(Move3DText[editobjnum],PURPLE,fX,fY,fZ,5.0,0,0);
because I would not be able to delete it again

c|:}


Re: Question about array with strings - Bicentric - 12.03.2013

pawn Код:
Create3DTextLabel(Move3DText[editobjnum],PURPLE,fX,fY,fZ);
This one here I think, there are more parameters you must enter.

pawn Код:
(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS)
You're not inputting the draw distance, virtual world, and test line of site.

Try

pawn Код:
Create3DTextLabel(Move3DText[editobjnum],PURPLE,fX,fY,fZ, 300.00, -1, 1);



Re: Question about array with strings - Denying - 12.03.2013

NOTE: You only need to add the draw distance unless you want the virtual world and test as you define them.
It basically sets them as the default (0) if you don't type them, but you must type the draw distance.


Re: Question about array with strings - Bicentric - 12.03.2013

Quote:
Originally Posted by Denying
Посмотреть сообщение
NOTE: You only need to add the draw distance unless you want the virtual world and test as you define them.
It basically sets them as the default (0) if you don't type them, but you must type the draw distance.
Heh I was thinking that at first too! That needs to be corrected on the SA:MP Wiki then, it should say:

pawn Код:
(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance = 500.00, virtualworld = -1, testLOS = 0)
So it indicates that the last 3 parameters are optional. Also, I am not sure what the default parameters are, so I just put them in as an example.


Re: Question about array with strings - horsemeat - 13.03.2013

Thanks Silly Me that was a noobie mistake then again I only have 1 start so I am a newbie C|:}
I also forgot the statement before so I can delete it again it was supposeto be this

Код:
blocklabel[editobjnum] = Create3DTextLabel(Move3DText[editobjnum],PURPLE,fX,fY,fZ,5.0,0,0);
Not This

Код:
Create3DTextLabel(Move3DText[editobjnum],PURPLE,fX,fY,fZ,5.0,0,0);
Thanks For helping out