Help! [warning 213: tag mismatch]
#1

Код:
new 	Float:Pos[4] = {-7.3049, -9.9316, -12.6804, -15.4929};
	for(new i=0;i<sizeof(Pos);i++) {
		3DText[i] = Create3DTextEx("sth", 2316.6213, Pos[i], 26.7422);//tag mismatch
	}
Код:
stock Create3DTextEx(_string[], Float:_X, Float:_Y, Float:_Z) {
	new _ex_string[128];	
	format(_ex_string, sizeof(_ex_string), "%s\nHum...", _string);
	Create3DTextLabel(_ex_string, COLOR_YELLOW, _X, _Y, (_Z+0.5), 25.0, 0, 1);
}
Anyone know how? thank you.
Reply
#2

Well you can't have variable names starting with a number.
You also didn't return a reference of the 3DText that was created.
Reply
#3

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Well you can't have variable names starting with a number.
You also didn't return a reference of the 3DText that was created.
Thank you, fix it.
But how can I destory it without a reference?
Reply
#4

To be honest with you there is absolutely no reason why you should need a function like Create3DTextEx() to do this in the first place I would do it like this.

You can test this code here: http://slice-vps.nl:7070/
pawn Код:
#include <a_samp>

#define         MY_TEXT_SIZE            4
#define         COLOR_YELLOW            0xFFFF00FF

new Text3D:MyText[MY_TEXT_SIZE];
stock const Float:Pos[MY_TEXT_SIZE] = {-7.3049, -9.9316, -12.6804, -15.4929};

main()
{
    for(new i=0;i<MY_TEXT_SIZE;i++) {
        MyText[i] = Create3DTextLabel("sth\nHum...", COLOR_YELLOW, 2316.6213, Pos[i], 26.7422+0.5, 25.0, 0, 1);
        printf("%i", _:MyText[i]);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)