"Warning 209: function "CreateDynamicVehicle" should return a value." - 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: "Warning 209: function "CreateDynamicVehicle" should return a value." (
/showthread.php?tid=295559)
"Warning 209: function "CreateDynamicVehicle" should return a value." -
rati555 - 06.11.2011
pawn Код:
stock CreateDynamicVehicle(playerid,modelid,type,color)
{
new Float:x, Float:y, Float:z, Float:angle;
for(new i = 0; i < sizeof(VehicleInfo); i++)
{
if(VehicleInfo[i][vOwned] == 0)
{
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,angle);
SendClientMessage(playerid,COLOR_WHITE,"vehicle created");
SendClientMessage(playerid,COLOR_WHITE,"dont forget /editveh.");
VehicleInfo[i][vOwned] = 1;
VehicleInfo[i][vModel] = modelid;
VehicleInfo[i][vType] = type;
VehicleInfo[i][vColorOne] = color;
VehicleInfo[i][vColorTwo] = 0;
VehicleInfo[i][vX] = x;
VehicleInfo[i][vY] = y;
VehicleInfo[i][vZ] = z;
VehicleInfo[i][vAngle] = angle;
return 1;
}
return 1;
}
}
please help
Re: "Warning 209: function "CreateDynamicVehicle" should return a value." -
SmiT - 06.11.2011
pawn Код:
stock CreateDynamicVehicle(playerid,modelid,type,color)
{
new Float:x, Float:y, Float:z, Float:angle;
for(new i = 0; i < sizeof(VehicleInfo); i++)
{
if(VehicleInfo[i][vOwned] == 0)
{
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,angle);
SendClientMessage(playerid,COLOR_WHITE,"vehicle created");
SendClientMessage(playerid,COLOR_WHITE,"dont forget /editveh.");
VehicleInfo[i][vOwned] = 1;
VehicleInfo[i][vModel] = modelid;
VehicleInfo[i][vType] = type;
VehicleInfo[i][vColorOne] = color;
VehicleInfo[i][vColorTwo] = 0;
VehicleInfo[i][vX] = x;
VehicleInfo[i][vY] = y;
VehicleInfo[i][vZ] = z;
VehicleInfo[i][vAngle] = angle;
return 1;
}
}
return true;
}
Re: "Warning 209: function "CreateDynamicVehicle" should return a value." -
rati555 - 06.11.2011
Quote:
Originally Posted by SmiT
pawn Код:
stock CreateDynamicVehicle(playerid,modelid,type,color) { new Float:x, Float:y, Float:z, Float:angle; for(new i = 0; i < sizeof(VehicleInfo); i++) { if(VehicleInfo[i][vOwned] == 0) { GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,angle); SendClientMessage(playerid,COLOR_WHITE,"vehicle created"); SendClientMessage(playerid,COLOR_WHITE,"dont forget /editveh."); VehicleInfo[i][vOwned] = 1; VehicleInfo[i][vModel] = modelid; VehicleInfo[i][vType] = type; VehicleInfo[i][vColorOne] = color; VehicleInfo[i][vColorTwo] = 0; VehicleInfo[i][vX] = x; VehicleInfo[i][vY] = y; VehicleInfo[i][vZ] = z; VehicleInfo[i][vAngle] = angle; return 1; } } return true; }
|
thanks worked +1