house system error
#1

PHP код:
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(19) : error 017undefined symbol "MAX_PLAYERS"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(19) : error 009invalid array size (negativezero or out of bounds
This is string (19)
PHP код:
new PlayerInHouseID[MAX_PLAYERS];//l'id della casa 
PHP код:
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(82) : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterDynamicCP"
This is string (82)
PHP код:
CMD:vendicasa(playerid,params[])
{
for(new 
0MAX_HOUSES;i++)//Loop threw all houses.
{
if(!
IsPlayerInRangeOfPoint(playerid,8.0,HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos])) continue;//Check if the player is near a house checkpoint
if(HInfo[i][Owned] == 0) return SendClientMessage(playerid,-1,"Questa casa non ha nessun proprietario");//Checking if the house is already owned.
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));//Retrieving the player's name.
if(HInfo[i][Owned] == && strcmp(pName,HInfo[i][Owner]) != 0) return SendClientMessage(playerid,-1,"Non sei il proprietario di questa casa!");//Checking if the house is owned but the owners name is different
HInfo[i][Owned] = 0;//Setting the house owned var to 1.
new file[60],string[100];//Creating the necessary vars.
format(HInfo[i][Owner],24,"Nonusablenameforthishouse");//Setting the House Owner's var
format(file,sizeof(file),"FHouse/Houses/%i.ini",i);//Formating the house file
INI_Open(file);//Opening the house file
INI_WriteInt("Owned",0);//Setting in the ini file "Owned" to 0
INI_WriteString("Owner","Nonusablenameforthishouse ");//Setting the "Owner" to the "Nonusablenameforthishouse".
INI_Save();//Saving the ini
INI_Close();//Closing the ini
format(string,sizeof(string),"Owned: No \nPrice: %i \nOwner: None",HInfo[i][Price],pName);//Formating the string, so we can update the label of the house
Update3DTextLabelText(HInfo[i][HouseLabel],0xFF0000FF,string);//Updating the label with a red color
return 1;
}
SendClientMessage(playerid,-1,"Non sei vicino ad una casa!");
return 
1;


PHP код:
 C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(115) : error 017undefined symbol "GetPlayerName"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(116) : error 017undefined symbol "strcmp"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(118) : error 017undefined symbol "SetPVarInt"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(119) : error 017undefined symbol "SetPVarInt"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(120) : error 017undefined symbol "SetPlayerInterior"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(121) : error 017undefined symbol "SetPlayerPos"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(122) : error 017undefined symbol "SetPlayerVirtualWorld"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(125) : error 017undefined symbol "strcmp"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(127) : error 017undefined symbol "SendClientMessage"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(131) : error 017undefined symbol "SendClientMessage"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(136) : error 017undefined symbol "SetPlayerPos"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(137) : error 017undefined symbol "SetPlayerInterior"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(138) : error 017undefined symbol "SetPlayerVirtualWorld"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(177) : warning 203symbol is never used"compracasa"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(177) : warning 203symbol is never used"creacasa"
C:\Users\Kevin11\Desktop\Napoli\filterscripts\case.pwn(177) : warning 203symbol is never used"vendicasa" 
This is string 115,etc:
PHP код:
GetPlayerName(playerid,pName,24);//Storing the players name
if(HInfo[i][Owned] == && strcmp(HInfo[i][Owner],pName) == 0)//String comparing between the players name and the house owners name, to check if they match.
{
SetPVarInt(playerid,"PlayersInteriorHouse",GetPlayerInterior(playerid));//Storing, so later we can reset it back
SetPVarInt(playerid,"PlayerVirtualWorldHouse",GetPlayerVirtualWorld(playerid));//Storing, so later we can reset it back
SetPlayerInterior(playerid,12);//Setting the players interior.
SetPlayerPos(playerid,446.7281,507.0475,1001.4195) ;//Setting the players position.
SetPlayerVirtualWorld(playerid,HInfo[i][VirtualWorld]);//Preventing players from different houses, finding each other.
PlayerInHouseID[playerid] = i;
}
if(
HInfo[i][Owned] == && strcmp(HInfo[i][Owner],pName) != 0)//Checking if the house is owned but the house owner and the players name don't match.
{
SendClientMessage(playerid,-1,"You don't own this house");
}
if(
HInfo[i][Owned] == 0)//Simply checking if the house isn't owned.
{
SendClientMessage(playerid,-1,"/buy to buy this lovely house");
}
}
if(
checkpointid == HouseExit[i])//Checking if the checkpointid is an House exit
{
SetPlayerPos(playerid,HInfo[i][XPos]+3,HInfo[i][YPos],HInfo[i][ZPos]);//Setting the players position to checkpoint position +3
SetPlayerInterior(playerid,GetPVarInt(playerid,"PlayersInteriorHouse"));//Setting the players interior to the one we stored
SetPlayerVirtualWorld(playerid,GetPVarInt(playerid ,"PlayerVirtualWorldHouse"));//Setting the players virtual world to the one we stored.
}
}
return 
1;
}
//stock
stock LoadHouses()//Creating the stock function
{
new 
file[60],houseowner[24];//creating the "file" var. And also creating the "houseowner" var so we can store it, when we are reading the house owner ini line.
for(new 0MAX_HOUSES;i++)//Looping threw every house
{
format(file,sizeof(file),"FAdmin/Houses/%i.ini",i);//Opening the house file with the current selected number with "i".
if(!INI_Exist(file)) continue;//Checking if the ini house file exist, if not to stop there.
INI_Open(file);//Opening the house ini
HInfo[i][Price] = INI_ReadInt("Price");//Reading the price.
HInfo[i][Owned] = INI_ReadInt("Owned");//Reading if it's owned.
HInfo[i][XPos] = INI_ReadInt("XPos");//Reading the X float position.
HInfo[i][YPos] = INI_ReadInt("YPos");//Reading the Y float position.
HInfo[i][ZPos] = INI_ReadInt("ZPos");//Reading the Z float position.
HInfo[i][VirtualWorld] = INI_ReadInt("VirtualWorld");//Reading the virtual world.
INI_ReadString(houseowner,"Owner");//Reading the house owner.
format(HInfo[i][Owner],24,"%s",houseowner);//Formating the "Owner" house id value to the red one.
HouseEnter[i] = CreateDynamicCP(HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos],1.5,HInfo[i][VirtualWorld]);//Creating the checkpoint and storing it in the HouseEnter value.
HouseExit[i] = CreateDynamicCP(443.9237,509.4609,1001.4195,1.5,HI nfo[i][VirtualWorld]);//Creating the house exit checkpoint and storing it in the HouseExit value.
new labelstring[100];//Creating the labelstring var.
switch(HInfo[i][Owned])//Using the "switch" method to check if the house is owned
{
case 
0:{format(labelstring,sizeof(labelstring),"Owned: No \nPrice: %i",HInfo[i][Price]);}//If it isnt...
case 1:{format(labelstring,sizeof(labelstring),"Owned: Yes \nPrice: %i \nOwner: %s",HInfo[i][Price],HInfo[i][Owner]);}//If it is...
}
HInfo[i][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos],25.0,HInfo[i][VirtualWorld]);//Creating the label with the formatted string.
HouseCount++;//+ counting the HouseCount var.
INI_Close();//Closing the SII file.
}
return 
1;

Reply
#2

I solved most of the errors someone help me to these fixxare:C:\Users\Kevin11\Desktop\Napoli\pawno\incl ude\SII.inc(4 : error 017: undefined symbol "strcmp"
C:\Users\Kevin11\Desktop\Napoli\pawno\include\SII. inc(4 : warning 215: expression has no effect
C:\Users\Kevin11\Desktop\Napoli\pawno\include\SII. inc(4 : warning 215: expression has no effect
C:\Users\Kevin11\Desktop\Napoli\pawno\include\SII. inc(4 : warning 215: expression has no effect
C:\Users\Kevin11\Desktop\Napoli\pawno\include\SII. inc(4 : error 001: expected token: ";", but found ")"
C:\Users\Kevin11\Desktop\Napoli\pawno\include\SII. inc(4 : error 029: invalid expression, assumed zero
C:\Users\Kevin11\Desktop\Napoli\pawno\include\SII. inc(4 : fatal error 107: too many error messages on one line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)