Posts: 328
Threads: 79
Joined: Jan 2011
I have a dealership script from california im trying to edit it to make it work without dialogs so i get many errors with this lines , anything wrong here?
Код:
if(strcmp(cmd, "/carbuy", true) == 0)
{
new veh = GetPlayerVehicleID(playerid);
if(VehOwned[veh] == 0)
{
if(IsADealerCar[veh] == 1)
{
new file[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"Cars/%s.ini",name);
new veh = GetPlayerVehicleID(playerid);
new money = GetPlayerMoney(playerid);
if(money >= CarPrice[veh])
{
if(gPlayerHasCar[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "You already own a car.");
new string[64];
SendClientMessage(playerid, 0xAFAFAFAA, "Thank you for buying at Coutt and Schutz.");
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
dini_Create(file);
Vehicle[playerid] = CreateVehicle(GetVehicleModel(veh), 2130.1914, -1109.5881, 25.1890, 76.2599, 1, 1, 3600000);
format(string, sizeof(string), "Creating your vehicle %i.", veh);
SendClientMessage(playerid, 0xAFAFAFAA, string);
VehicleInfo[playerid][Model] = GetVehicleModel(veh);
VehicleInfo[playerid][Price] = CarPrice[veh];
VehicleInfo[playerid][CarX] = 2130.1914;
VehicleInfo[playerid][CarY] = -1109.5881;
VehicleInfo[playerid][CarZ] = 25.1890;
VehicleInfo[playerid][CarRot] = 76.2599;
gPlayerHasCar[playerid] = 1;
RemovePlayerFromVehicle(playerid);
OwnerID[Vehicle[playerid]] = playerid;
VehPlate[Vehicle[playerid]] = "XYZR 000";
PutPlayerInVehicle(playerid, Vehicle[playerid], 0);
GivePlayerMoney(playerid, -VehicleInfo[playerid][Price]);
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xAFAFAFAA, "You cannot afford this vehicle.");
return 1;
}
}
}
Posts: 328
Threads: 79
Joined: Jan 2011
Posts: 328
Threads: 79
Joined: Jan 2011
bump please help me out please
Posts: 2,038
Threads: 17
Joined: Aug 2010
Reputation:
0
What are the Error lines ?
Peace...
Posts: 686
Threads: 29
Joined: Feb 2011
Reputation:
0
Post the exact errors you get.
Posts: 328
Threads: 79
Joined: Jan 2011
This is the errors i get,
Код:
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(780) : error 004: function "LoadTrunk" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(822) : error 004: function "SaveTrunk" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1195) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1209) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1223) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1237) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1251) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1265) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1279) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1293) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1307) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1321) : error 004: function "RemovePlayerWeapon" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1561) : warning 219: local variable "veh" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1594) : warning 217: loose indentation
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1603) : error 017: undefined symbol "IsACar"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1723) : warning 217: loose indentation
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1723) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1723) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1734) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1734) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1734) : error 004: function "OnVehicleStreamIn" is not implemented
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1736) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1738) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1739) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1743) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1744) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1749) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1749) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1749) : error 017: undefined symbol "IsACar"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1751) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1765) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\dealership.pwn(1765) : error 029: invalid expression, assumed zero
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Posts: 1,110
Threads: 183
Joined: Jul 2009
Reputation:
0
Youre missing a } somewhere.
Posts: 328
Threads: 79
Joined: Jan 2011
This is the entire edited script
http://pastebin.com/jKWP5VLm
Posts: 328
Threads: 79
Joined: Jan 2011
Can you find any thing wrong in the script, Thanks in advance