Jump to content
  • 0

Problema Acreatething


SkyLeAs

Question

Problemă întâlnită (descriere):Pai imi da niste erori..
Ero(area / rile) / warning-(ul / urile):

D:Servergamemodesbare.pwn(3755) : warning 219: local variable "X" shadows a variable at a preceding level
D:Servergamemodesbare.pwn(3755) : warning 219: local variable "Y" shadows a variable at a preceding level
D:Servergamemodesbare.pwn(3755) : warning 219: local variable "Z" shadows a variable at a preceding level
D:Servergamemodesbare.pwn(3761) : error 017: undefined symbol "Vehicle"
D:Servergamemodesbare.pwn(3761) : warning 215: expression has no effect
D:Servergamemodesbare.pwn(3761) : error 001: expected token: ";", but found "]"
D:Servergamemodesbare.pwn(3761) : error 029: invalid expression, assumed zero
D:Servergamemodesbare.pwn(3761) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Liniile de cod / sursa / script-ul:

stock aCreateThing(playerid, thingid, orderid)
{
	new Float:X, Float:Y, Float:Z, Float:Angle;
	GetPlayerPos(playerid, X, Y, Z);
	GetPlayerFacingAngle(playerid, Angle);

	if(thingid != 597)
	{
		Vehicle[orderid] = AddStaticVehicleEx(thingid, X, Y, Z + 3, Angle, random(126), random(126), 40);
	}
	else
	{
	    Vehicle[orderid] = AddStaticVehicleEx(thingid, X, Y, Z + 3, Angle, 0, 1, 40);
	}
	PutPlayerInVehicle(playerid, Vehicle[orderid], 0);
	TogglePlayerControllable(playerid, true);
	return 1;
}

De aici este problema :(

Imagini / Video (optional):!!
Aţi încercat să rezolvaţi singur?:Nu stiu cum X_X

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Pune asa:

new Vehicle[MAX_VEHICLES];

 

Edit:

vezi asa

stock aCreateThing(playerid, thingid, orderid)
{
	new Float:XPOS[4], Vehicle[MAX_VEHICLES];
	GetPlayerPos(playerid, XPOS[0], XPOS[1], XPOS[2]);
	GetPlayerFacingAngle(playerid, XPOS[3]);

	if(thingid != 597)
	{
		Vehicle[orderid] = AddStaticVehicleEx(thingid, XPOS[0], XPOS[1], XPOS[2]+3, XPOS[3], random(126), random(126), 40);
	}
	else
	{
	    Vehicle[orderid] = AddStaticVehicleEx(thingid, XPOS[0], XPOS[1], XPOS[2]+3, XPOS[3], 0, 1, 40);
	}
	PutPlayerInVehicle(playerid, Vehicle[orderid], 0);
	TogglePlayerControllable(playerid, true);
	return 1;
}
Edited by sRk7
  • Upvote 1

"Mulţi programatori buni fac programare nu pentru că se aşteaptă să câştige bani sau să fie lăudaţi de public, ci pentru că e amuzant să programezi." - Linus Torvalds

Link to comment
Share on other sites

 

Pune asa:

 

Edit:

vezi asa



stock aCreateThing(playerid, thingid, orderid)
{
	new Float:XPOS[4], Vehicle[MAX_VEHICLES];
	GetPlayerPos(playerid, XPOS[0], XPOS[1], XPOS[2]);
	GetPlayerFacingAngle(playerid, XPOS[3]);

	if(thingid != 597)
	{
		Vehicle[orderid] = AddStaticVehicleEx(thingid, XPOS[0], XPOS[1], XPOS[2]+3, XPOS[3], random(126), random(126), 40);
	}
	else
	{
	    Vehicle[orderid] = AddStaticVehicleEx(thingid, XPOS[0], XPOS[1], XPOS[2]+3, XPOS[3], 0, 1, 40);
	}
	PutPlayerInVehicle(playerid, Vehicle[orderid], 0);
	TogglePlayerControllable(playerid, true);
	return 1;
}

Like+ Multumesc mult

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.