[Help] House System
#1

Hello all , i tried to make house system (with vehicles) and i followed from the following link :
https://sampforum.blast.hk/showthread.php?tid=179206

Everything goes correctly and i got no errors / warnings but when i add the following command

PHP код:
if(!strcmp(cmdtext"/buyhouse"true))
{
    new 
pName[MAX_PLAYER_NAME]; //For the player's name - For the house
    
GetPlayerName(playeridpNameMAX_PLAYER_NAME); //Get the name of the player and store it in pName
    
for(new 0MAX_HOUSESi++) //Last time I'm gonna say it: Loop through all the houses
    
{
        if(
IsPlayerInRangeOfPoint(playerid1.5HouseInfo[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(playeridCOLOR_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(playeridCOLOR_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], pName0falsestrlen(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(playeridCOLOR_GREEN"House bought!"); //Send the player an message.
            
SaveHouse(i);
            
LoadHouseVisual(itrue); //Load House Visual. Now, I've added ', true': It will RELOAD now!
            
return 1;
        }
    }
    return 
1;

It gives me alot of errors :
PHP код:
filterscripts\housesystem.pwn(321) : warning 202number of arguments does not match definition 
filterscripts
\housesystem.pwn(378) : error 017undefined symbol "IsValidVehicleModel" 
filterscripts\housesystem.pwn(380) : error 029invalid expressionassumed zero 
filterscripts
\housesystem.pwn(380) : error 017undefined symbol "IsValidVehicleModel" 
\filterscripts\housesystem.pwn(382) : error 017undefined symbol "vehiclemodel" 
\filterscripts\housesystem.pwn(386) : warning 225unreachable code 
\filterscripts\housesystem.pwn(386) : warning 217loose indentation 
filterscripts
\housesystem.pwn(402) : error 017undefined symbol "hOUtsideVir" 
filterscripts\housesystem.pwn(404) : warning 202number of arguments does not match definition 
filterscripts
\housesystem.pwn(409) : warning 202number of arguments does not match definition 
filterscripts
\housesystem.pwn(410) : warning 202number of arguments does not match definition 
As these Undefined symbols are already written before this (/buyhouse) command but when i add (/buyhouse) command it gives me the errors and also more warnings.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)