14.02.2012, 12:28
Tipo galera eai..
quando eu boto estes comandos:
o GM Da Varios erros! sem esses comandos ele cpmpilam normal, entao alguem pode dizer oq tem de errado nos comandos?
erros:
quando eu boto estes comandos:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/vendercasa", true))
{
new pName[MAX_PLAYER_NAME]; //See /buyhouse
GetPlayerName(playerid, pName, MAX_PLAYER_NAME); //See new pName[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_HOUSES; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
{
if(!strcmp(HouseInfo[i][hOwner], pName, false)) //Is the owner of the house the same as the players name (is the player the owner?? !)
{
strmid(HouseInfo[i][hOwner], "For Sale", 0, false, 8); //Set the owner of the house to "For Sale"
HouseInfo[i][hOwned] = false; //House is not owner anymore!
GivePlayerMoney(playerid, HouseInfo[i][hPrice]/2); //Give the player 50% of the house value back!
SendClientMessage(playerid, COLOR_GREEN, "House sold!");
SaveHouse(i);
LoadHouseVisual(i, true); //Load House Visual. Now, I've added ', true': It will RELOAD now!
return 1;
}
}
}
return 1;
}
if(!strcmp(cmdtext, "/carrocasa", true))
{
new pName[MAX_PLAYER_NAME], Float:X, Float:Y, Float:Z;
new houseid = cmdtext[10]; //The param. /tphousecar is 0-8. With a space, 9. Then, the param is at 10.
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
if(!strcmp(HouseInfo[houseid][hOwner], pName, false)) return SendclientMessage(playerid, COLOR_RED, "You are not the owner of the house!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be in an vehicle!"); //if is player not in an vehicle, send an message and stop (RETURN [message])
GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
HouseInfo[houseid][hVecX] = X;
HouseInfo[houseid][hVecY] = Y;
HouseInfo[houseid][hVecZ] = Z;
HouseInfo[houseid][hVecA] = A;
return 1;
}
if(!strcmp(cmdtext, "/vendercasa", true))
{
new pName[MAX_PLAYER_NAME]; //For the player's name - For the house
GetPlayerName(playerid, pName, MAX_PLAYER_NAME); //Get the name of the player and store it in pName
for(new i = 0; i < MAX_HOUSES; i++) //Last time I'm gonna say it: Loop through all the houses
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir]) //Is player near house entrance, and if player is in interior of that house + virtual world (Last time I said this too!)
{
if(HouseInfo[i][hOwned]) return SendClientMessage(playerid, COLOR_RED, "This house is already owned!"); //Is the house owned? Then send message that it's owned and stop.
if(GetPlayerMoney(playerid) < HouseInfo[i][hPrice]) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money for this!"); //Has player too less money? Send him a message!
HouseInfo[i][hOwned] = true; //The house is owned, where the player used /buyhouse
strmid(HouseInfo[i][hOwner], pName, 0, false, strlen(pName)); //Put the players name into the "hOwner" of the house
GivePlayerMoney(playerid, -HouseInfo[i][hPrice]); //Remove some money of the player.. The value of the house
SendClientMessage(playerid, COLOR_GREEN, "House bought!"); //Send the player an message.
SaveHouse(i);
LoadHouseVisual(i, true); //Load House Visual. Now, I've added ', true': It will RELOAD now!
return 1;
}
}
return 1;
}
return 0;
}
erros:
pawn Код:
D:\Бrea de Trabalho\meg2.pwn(52) : error 017: undefined symbol "hOutsideInt"
D:\Бrea de Trabalho\meg2.pwn(60) : error 017: undefined symbol "SaveHouse"
D:\Бrea de Trabalho\meg2.pwn(76) : error 017: undefined symbol "A"
D:\Бrea de Trabalho\meg2.pwn(80) : error 017: undefined symbol "A"
D:\Бrea de Trabalho\meg2.pwn(90) : error 017: undefined symbol "hOutsideInt"
D:\Бrea de Trabalho\meg2.pwn(99) : error 017: undefined symbol "SaveHouse"
D:\Бrea de Trabalho\meg2.pwn(146) : error 017: undefined symbol "hOutsideVir"
D:\Бrea de Trabalho\meg2.pwn(147) : error 017: undefined symbol "hOutsideVir"
D:\Бrea de Trabalho\meg2.pwn(152) : error 017: undefined symbol "hOutsideVir"
D:\Бrea de Trabalho\meg2.pwn(153) : error 017: undefined symbol "hOutsideVir"
D:\Бrea de Trabalho\meg2.pwn(155) : error 017: undefined symbol "IsValidVehicleModel"
D:\Бrea de Trabalho\meg2.pwn(158) : warning 217: loose indentation
D:\Бrea de Trabalho\meg2.pwn(158) : error 029: invalid expression, assumed zero
D:\Бrea de Trabalho\meg2.pwn(158) : error 017: undefined symbol "IsValidVehicleModel"
D:\Бrea de Trabalho\meg2.pwn(159) : warning 217: loose indentation
D:\Бrea de Trabalho\meg2.pwn(160) : error 017: undefined symbol "vehiclemodel"
D:\Бrea de Trabalho\meg2.pwn(165) : warning 225: unreachable code
D:\Бrea de Trabalho\meg2.pwn(165) : error 029: invalid expression, assumed zero
D:\Бrea de Trabalho\meg2.pwn(165) : error 017: undefined symbol "SaveHouse"
D:\Бrea de Trabalho\meg2.pwn(174) : error 017: undefined symbol "hInsideInt"
D:\Бrea de Trabalho\meg2.pwn(175) : error 017: undefined symbol "hInsideVir"
D:\Бrea de Trabalho\meg2.pwn(176) : error 017: undefined symbol "hOutsideInt"
D:\Бrea de Trabalho\meg2.pwn(177) : error 017: undefined symbol "hOUtsideVir"
D:\Бrea de Trabalho\meg2.pwn(179) : warning 202: number of arguments does not match definition
D:\Бrea de Trabalho\meg2.pwn(184) : warning 202: number of arguments does not match definition
D:\Бrea de Trabalho\meg2.pwn(185) : warning 202: number of arguments does not match definition
D:\Бrea de Trabalho\meg2.pwn(189) : warning 225: unreachable code
D:\Бrea de Trabalho\meg2.pwn(189) : error 029: invalid expression, assumed zero
D:\Бrea de Trabalho\meg2.pwn(189) : error 004: function "OnPlayerKeyStateChange" is not implemented
D:\Бrea de Trabalho\meg2.pwn(191) : error 017: undefined symbol "newkeys"
D:\Бrea de Trabalho\meg2.pwn(195) : error 017: undefined symbol "playerid"
D:\Бrea de Trabalho\meg2.pwn(197) : error 017: undefined symbol "playerid"
D:\Бrea de Trabalho\meg2.pwn(198) : error 017: undefined symbol "playerid"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.