30.03.2014, 02:07
I haven't used arrays much, but I'm trying to learn how to use them properly. I've tried self-tests but they all lead to failure. How would I load all the coordinates from this array? So I can use "Create3DTextLabel" once, instead of having multiple for the same thing.
Here's what I've tried to do.
Which leads me to:
How would I be able to load all the coordinates from the array into just one create3dtextlabel? Like this:
So it creates a pickup at the array's coordinates instead of me having to completely add multiple text labels.
Here's what I've tried to do.
pawn Code:
new Float:fishingspots[0][2] =
{
{-1874.6598,-1670.0956,0.9824}
};
Create3DTextLabel("Fishing area.\n/fish ", 0x008080FF,fishingspots[0][0], fishingspots[0][1], fishingspots[0][2], 20.0, 0, 0);
Code:
C:\Users\Luke\Desktop\hungergames.pwn(50) : error 018: initialization data exceeds declared size C:\Users\Luke\Desktop\hungergames.pwn(1085) : error 032: array index out of bounds (variable "fishingspots")
pawn Code:
Create3DTextLabel("Fishing area.\n/fish ", 0x008080FF,fishingspots[][0], fishingspots[][1], fishingspots[][2], 20.0, 0, 0);