symbol is assigned a value that is never used:
#1

Hello i have warnings and i dont know how to fix them :

pawn Код:
warning 204: symbol is assigned a value that is never used: "dcar10text"
They're 20 like this dcar11text.. dcar12text...
pawn Код:
new Text3D:dcar1text;
new Text3D:dcar2text;
new Text3D:dcar3text;
new Text3D:dcar4text;
new Text3D:dcar5text;
new Text3D:dcar6text;
new Text3D:dcar7text;
new Text3D:dcar8text;
new Text3D:dcar9text;
new Text3D:dcar10text;
new Text3D:dcar11text;
new Text3D:dcar12text;
new Text3D:dcar13text;
new Text3D:dcar14text;
new Text3D:dcar15text;
new Text3D:dcar16text;
new Text3D:dcar17text;
new Text3D:dcar18text;
new Text3D:dcar19text;
new Text3D:dcar20text;
new Text3D:dcar21text;
pawn Код:
dcar1 = CreateVehicle(400,170.3152,-58.0595,1.6545,179.8932,136,136,600);
dcar1text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar2 = CreateVehicle(445,165.9281,-57.7910,1.4360,179.7319,136,136,600);
dcar2text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar3 = CreateVehicle(527,161.8311,-57.3036,1.2771,179.8019,136,136,600);
dcar3text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar4 = CreateVehicle(507,157.6347,-57.6538,1.3843,178.8763,136,136,600);
dcar4text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar5 = CreateVehicle(421,152.9185,-57.5320,1.4427,178.7738,136,136,600);
dcar5text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar6 = CreateVehicle(542,148.0450,-57.4968,1.3035,177.1709,136,136,600);
dcar6text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar7 = CreateVehicle(549,143.4820,-56.9487,1.2564,174.0626,136,136,600);
dcar7text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar8 = CreateVehicle(405,138.4883,-57.0013,1.4324,177.6265,136,136,600);
dcar8text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar9 = CreateVehicle(492,133.5719,-56.7331,1.3223,178.1835,136,136,600);
dcar9text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar10 = CreateVehicle(458,133.5632,-43.2134,1.4096,177.5074,136,136,600);
dcar10text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar11 = CreateVehicle(555,139.2839,-43.0860,1.2218,175.3886,136,136,600);
dcar11text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );

dcar12 = CreateVehicle(500,144.2605,-43.4866,1.6619,173.6292,136,136,600);
dcar12text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Reply
#2

Can't you read the warning..? You're defined a symbol and never used it. Either use it, or don't declare it..
Reply
#3

I use it
dcar11text = Create3DTextLabel( "Цена - ЛВ.", VAGOS_COLOR, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Reply
#4

That is exactly what the warning is telling you.

You are assigning a value to those variables with the "Create3DTextLabel" function, but you aren't doing anything with them afterwards. "symbol is assigned a value that is never used".

If you plan on using those variables later, you can just ignore the warnings for now. If you do not plan on ever using them for anything, remove the variables and just don't store the result of the "Create3DTextLabel" function, otherwise it's just a waste of memory.
Reply
#5

Thomas is right.
To further explain his meaning:

pawn Код:
// code here
new var=5;
// more code here without using var
You will get a warning here as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)