PDA

View Full Version : help please don't ignore this (+REP)


MarkNelson
08/07/2016, 02:58 PM
hi i have this warning and i want fix it
warning 204: symbol is assigned a value that is never used: "barrel"

here is the line :
barrel = CreatePlayerObject(playerid,1225,BarrelX[playerid]-0.5,BarrelY[playerid],BarrelZ[playerid]-0.5,0,-1,-1,-1);

diego200052
08/07/2016, 03:00 PM
The variable barrel has never used, you only assign a value.

To fix it, use the variable or remove it.

SyS
08/07/2016, 03:01 PM
this warning comes when you give or assign value to a variable and never make use of it the code remove the variable or check if you missed its usage somewhere (if you dont want it now you can simply remove it or comment it)

Farzam
08/07/2016, 03:02 PM
add
new barrel;
in your script lines.

MarkNelson
08/07/2016, 03:03 PM
i added the new barrel;
and
new Float:BarrelX[MAX_PLAYERS], Float:BarrelY[MAX_PLAYERS], Float:BarrelZ[MAX_PLAYERS];
help please

SyS
08/07/2016, 03:05 PM
i added the new barrel;
and
new Float:BarrelX[MAX_PLAYERS], Float:BarrelY[MAX_PLAYERS], Float:BarrelZ[MAX_PLAYERS];
help please

you just ignored what i said

this warning comes when you give or assign value to a variable and never make use of it the code remove the variable or check if you missed its usage somewhere (if you dont want it now you can simply remove it or comment it)

Farzam
08/07/2016, 03:06 PM
did you define the
Float:BarrelX[MAX_PLAYERS], Float:BarrelY[MAX_PLAYERS], Float:BarrelZ[MAX_PLAYERS];
? If no then It won't work for sure.
you'll have to define the Float:BarrelX,Float:BarrelY,Float:BarrelZ.
and make sure you have used the function in right way.
CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float: DrawDistance = 0.0)

diego200052
08/07/2016, 03:08 PM
The warning is because you don't used the variable in any function or anything you ONLY assign a value.

Example:

DestroyPlayerObject(playerid, barrel);

MarkNelson
08/07/2016, 03:11 PM
thanks thanks and thanks ! Mexicano xD :) mexican peoples are helpfull.
and i know them. i will come to mexico soon