Help Again
#1

Код:
public OnFilterScriptExit()
{
	return 1;
}

new pickup;

public OnGameModeInit()
{
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	pickup = CreatePickup(1318, 20, 2309.8423, -1644.9840, 14.8270, -1);
	pickup = CreatePickup(1318, 20, 501.8214, -69.0665, 998.7578, -1);
	pickup = CreatePickup(1239, 3, 497.1258, -75.9710, 998.7578, -1);
	Create3DTextLabel("Напиши /enter", 0x2D06A1, 2309.8423, -1644.9840, 14.8270, 40.0, 0 ,0);
	Create3DTextLabel("Напиши /exit", 0x2D06A1, 501.8214, -69.0665, 998.7578, 40.0, 0 ,0);
	Create3DTextLabel("Напиши /drinks", 0x2D06A1, 497.1258, -75.9710, 998.7578, 40.0, 0 ,0);
	return 1;
}
D:\igri\GTA San Andreas\filterscripts\xc.pwn(29) : warning 204: symbol is assigned a value that is never used: "pickup"

i tried to fix it but again t's showing this
Reply
#2

Add the "new pickup;" in OnGameModeInit and try compile.
Reply
#3

There are error and warning man
Reply
#4

There are erors and warning man
Reply
#5

You don't have to assign the pickups to a variable if you do not need them in your script. Just remove all the pickup variables and it'll be fixed
Reply
#6

if fixed it with the command AddStaticPickup
Reply
#7

As FUNExtreme explained, you are not actually using the variable, you are just creating it and assigning a variable to it. At the moment, it is useless, as you never reference it at a later point. Unless you plan to use the variables at a later point, such as at OnPlayerPickUpPickup, then you can delete the variable and where you assign it to the CreatePickup lines. Do not simply change the function to remove the warnings, you are just wasting memory. It is not a big deal with this snippet, but if you are using those techniques in a bigger script, it could cause problems.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)