PDA

View Full Version : Warning fix


Nin9r
09/02/2017, 08:45 AM
I have a warning but i don't know what's wrong.

1.
D:\server\gmi.pwn(65945) : warning 213: tag mismatch

Line 65945:
bust[playerid] = CreatePlayer3DTextLabel(playerid,"",0x008080FF,-0.0129, 1.0810, 1.0200,40.0);
Line above and after:
switch(PlayerData[playerid][pStrongModel])
{
case 0: param2 = "Strong";
case 1: param2 = "Low";
default: param2 = "Unknown";
}
buster[playerid] = CreatePlayer3DTextLabel(playerid,"",0x008080FF,-0.0129, 1.0810, 1.0200,40.0);
new km = PlayerData[playerid][KM2];
Thanks !

Mic_H
09/02/2017, 08:58 AM
Make sure the following is correct:>

new PlayerText3D:bust[MAX_PLAYERS];

You might've written it as:> Text3D:


bust[playerid] = CreatePlayer3DTextLabel(playerid,"",0x008080FF,-0.0129, 1.0810, 1.0200,40.0);

Never make text[] empty.... Replace the above with

bust[playerid] = CreatePlayer3DTextLabel(playerid,"_",0x008080FF,-0.0129, 1.0810, 1.0200,40.0);

Reason:> If text[] is empty, the server/clients next to the text might crash!


SAme for buster[playerid]

Ref: Click here: SAMP-Wiki (http://wiki.sa-mp.com/wiki/CreatePlayer3DTextLabel)

Nin9r
09/02/2017, 09:02 AM
Doesn't work. If I replace new Text3d:bust[MAX_PLAYERS]; with your line i will receive more tag mismatch warnings.

I put _ there and still receive that warning. :(

Mic_H
09/02/2017, 09:26 AM
Change "CreatePlayer3DTextLabel(playerid" to "Create3DTextLabel("
You are trying to store a PlayerText3D inside a Text3D variable.. That's why you are getting the warning.