Help, float arrays error!
#1

This is the code:
new Float:Pos[3];

pos = {10.0, 10.0, 10.0};

The error: tag mismatch.

Thank you in advance!
Reply
#2

when putting data you should declare the slot in this case :
pos[0] = 10.0
pos[1] = 10.0
pos[2] = 10.0

or declare values from begining:
new Float:Pos[3] = {
10.0, 10.0, 10.0
};
Reply
#3

Quote:
Originally Posted by Neos07
Посмотреть сообщение
This is the code:
new Float:Pos[3];

pos = {10.0, 10.0, 10.0};

The error: tag mismatch.

Thank you in advance!
I have tried this code:
Код:
new Pos[3];
Pos = {10.0,10.0,10.0};
It worked. maybe you didnt notice the fact there is 'P' and not 'p'?

You can also do it this way:
Код:
new Float:Pos[3];
Pos[0] = 10.0;
Pos[1] = 10.0;
Pos[2] = 10.0;
Reply
#4

Quote:
Originally Posted by FilesMAker
Посмотреть сообщение
when putting data you should declare the slot in this case :
pos[0] = 10.0
pos[1] = 10.0
pos[2] = 10.0

or declare values from begining:
new Float:Pos[3] = {
10.0, 10.0, 10.0
};
Thank you! But I know this method, just because I will use it many time and I wanna save some place and time.
It works fine with integers.
Reply
#5

Quote:
Originally Posted by maximthepain
Посмотреть сообщение
I have tried this code:
Код:
new Pos[3];
Pos = {10.0,10.0,10.0};
It worked. maybe you didnt notice the fact there is 'P' and not 'p'?

You can also do it this way:
Код:
new Float:Pos[3];
Pos[0] = 10.0;
Pos[1] = 10.0;
Pos[2] = 10.0;
Thank you for your reply, but it was just an example of my problem! So it doesn't matter if P or p, I got about 23 errors because I'm using it too much!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)