SA-MP Forums Archive
help please don't ignore this (+REP) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help please don't ignore this (+REP) (/showthread.php?tid=611575)



help please don't ignore this (+REP) - MarkNelson - 08.07.2016

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);



Re: help please don't ignore this (+REP) - diego200052 - 08.07.2016

The variable barrel has never used, you only assign a value.

To fix it, use the variable or remove it.


Re: help please don't ignore this (+REP) - SyS - 08.07.2016

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)


Re: help please don't ignore this (+REP) - Farzam - 08.07.2016

add
Quote:

new barrel;

in your script lines.


Re: help please don't ignore this (+REP) - MarkNelson - 08.07.2016

i added the
Код:
new barrel;
and 
new Float:BarrelX[MAX_PLAYERS], Float:BarrelY[MAX_PLAYERS], Float:BarrelZ[MAX_PLAYERS];
help please


Re: help please don't ignore this (+REP) - SyS - 08.07.2016

Quote:
Originally Posted by MarkNelson
Посмотреть сообщение
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

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
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)



Re: help please don't ignore this (+REP) - Farzam - 08.07.2016

did you define the
Quote:

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.
Quote:

CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float: DrawDistance = 0.0)




Re: help please don't ignore this (+REP) - diego200052 - 08.07.2016

The warning is because you don't used the variable in any function or anything you ONLY assign a value.

Example:

PHP код:
DestroyPlayerObject(playeridbarrel); 



Re: help please don't ignore this (+REP) - MarkNelson - 08.07.2016

thanks thanks and thanks ! Mexicano xD mexican peoples are helpfull.
and i know them. i will come to mexico soon