I have 2 warnings - 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: I have 2 warnings (
/showthread.php?tid=353126)
I have 2 warnings -
Frosty_LV - 22.06.2012
Hello! May you please help me fix 2 warnings? :/
error 001: expected token: ";", but found "return"
warning 204: symbol is assigned a value that is never used: "Shop"
Line which gaved me problems:
return 1;
Yeah, its wierd, because this line have only this, but it still gives me 2 errors :S
Re: I have 2 warnings -
Djumza - 22.06.2012
show us a little more ,maybe that part of script.
Re: I have 2 warnings -
ryansheilds - 22.06.2012
Show the line before the return.
Re: I have 2 warnings -
Frosty_LV - 22.06.2012
Код:
public OnGameModeInit()
{
Shop = CreatePickup(1318,1,1352.1962,-1756.9938,13.5078)
// Don't use these lines if it's a filterscript
Here you go.
Re: I have 2 warnings -
Skaizo - 22.06.2012
pawn Код:
Shop = CreatePickup(1318,1,1352.1962,-1756.9938,13.5078);
Re: I have 2 warnings -
ryansheilds - 22.06.2012
Add ';' to the end of the 'Shop = CreatePickup(1318,1,1352.1962,-1756.9938,13.507

'.
Re: I have 2 warnings -
Frosty_LV - 22.06.2012
Thanks for advice, but now it gives me this:
warning 204: symbol is assigned a value that is never used: "Shop"
Re: I have 2 warnings -
Skaizo - 22.06.2012
you have at top of script
?if no, add this
Edit: you need add function of Shop
exemple
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Shop) GivePlayerMoney(playerid,10000);
return 1;
}
Re: I have 2 warnings -
ryansheilds - 22.06.2012
You never use it after creating the pickup, like to destroy it, so it's not needed. You can just remove 'shop' when creating the pickup and remove the global variable of it, in-less you're planning to use it somewhere else.
Re: I have 2 warnings -
Frosty_LV - 22.06.2012
Well, I removed that ''Shop'' and now works fine, except thing that I want to give name for that marker. Now it's just a marker, without name, people wont know what is in there :/