SA-MP Forums Archive
HELP? please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP? please (/showthread.php?tid=185271)



HELP? please - BigAl - 23.10.2010

warning 204: symbol is assigned a value that is never used: "PV"

i get this warning, this is the line:

PV = CreateVehicle(553,2045.50915527,593.89831543,13.07 719326,300.00000000,-1,-1,15); //Nevada

please help i have tried writing that line in three different ways

with:
CreateVehicle
AddStaticVehicle
AddStaticVehicleEx

please help?


Re: HELP? please - JaTochNietDan - 23.10.2010

There's no problem really, you just haven't used the variable PV yet for anything other than storing information in it. It's just informing you of that in-case you've created a variable that you're not using for anything which is a waste of space.

If you want to get rid of the warning, then use it somewhere, the code you have is fine. Use it somewhere like in a statement...a function, anywhere.

If you're not going to use it anywhere, why have it


Re: HELP? please - BigAl - 23.10.2010

thanks, but if i put it anywhere could that brake my script?


Re: HELP? please - BigAl - 23.10.2010

where do i put it? because i am using that PV = co-ord stuff for a private vehicle hence the name PV, thanks anyway, i tried to put PV anywhere but hey it never worked. could it be the fact that at the top i put new PV; ?


Re: HELP? please - JaTochNietDan - 23.10.2010

Well I mean you must have SOME use for the ID of the vehicle if you're storing it? Why else would you store it? If you really have no reason to store it, then remove the variable completely :S

Alternatively if you're never going to use the variable and for some bizzare reason don't want to remove it, you can add #pragma unused PV to your script :/

Maybe you're a little confused? You do know you don't need a PV = before the CreateVehicle at all to create a vehicle?