Help[House System]!!!
#1

OK,so I started to script a house system.Meanwhile I followed a really good tutorial,wich really helped me much.In the tutorial the database was created with SQLite,I tried to transform it inot YINI,and hopefully it'll work.By my estimations,the house system is 99% done[not tested yet due to the error mentioned bellow].So the erroris the following:

pawn Код:
#define hPATH "/HousesDB/%s.ini"
#define MAX_HOUSES 30

enum hInfo
{
   Text3D:hText,
   Owner[MAX_PLAYER_NAME],
   DefaultPrice,
   SellPrice,
   Interior,
   hSell,
   hPickup,
   Float:EnterPos[3],
   Float:TelePos[3]
}

new HouseInfo[MAX_HOUSES][hInfo];

stock HousesDB(houseid)
{
   new string[256];
   format(string,sizeof(string),hPATH,HouseInfo[houseid][Owner]);
   return string;
}

forward LoadHouse_Data(houseid,name[],value[]);

public LoadHouse_Data(houseid,name[],value[])
{
   INI_String("Owner",HouseInfo[houseid][Owner],24);
   INI_Int("SellPrice",HouseInfo[houseid][SellPrice]);
   INI_Int("Interior",HouseInfo[houseid][Interior]);
   return 1;
}

stock CreateHouse(Price,Float:EnterX,Float:EnterY,Float:EnterZ,Layout,TeleX,TeleY,TeleZ)
{
   HouseInfo[houseid][DefaulPrice] = Price;
   HouseInfo[houseid][EnterPos][0] = EnterX;
   HouseInfo[houseid][EnterPos][1] = EnterY;
   HouseInfo[houseid][EnterPos][2] = EnterZ;
   HouseInfo[houseid][Interior] = Layout;
   HouseInfo[houseid][TelePos][0] = TeleX;
   HouseInfo[hosueid][TelePos][1] = TeleY;
   HouseInfo[houseid][TelePos][2] = TeleZ;
   HouseInfo[houseid][hPickup] = CreatePickup(1273,1,EnterX,EnterY,EnterZ,0);
   HouseInfo[houseid][hSell]=0;
   new sttring[250];
   if(!HouseInfo[houseid][Owner][0]) format(string,sizeof(string),"{FOR SELL}\nPrice:%d",DefaultPrice);
   else if(HouseInfo[houseid][Owner][0] != 0)
   {
      if(HouseInfo[houseid][hSell]==0) format(string,sizeof(string),"Owner:%s",HouseInfo[houseid][Owner]);
      else if(HouseInfo[houseid][hSell]==1) format(string,sizeof(string),"{FOR SELL}\nOwner:%s\nSell price:%d",HouseInfo[houseid][Owner],HouseInfo[houseid][SellPrice]);
   }
   HounseInfo[houseid][hText] = Create3DTextLabel(string,COLOR_DARKOLIVEGREEN,EnterX,EnterY,EnterZ+0.5,50.0);
   houseid++;
 return 1;
}

CreateHouse(5000,221.6365,114.6479,999.0156,5,1267.663208,-781.323242,1091.906250);//ERROR:invalid function or declaration+symbol already defined
Please,be nice and read it slowly,getting reputation if you help me!!![Why?Because this is a really important script].Why I am not showing you all the code?Will do it later if the house system won't work,after we fix this error,cause I am pretty sure the problem is in the code depicted above.
Reply


Messages In This Thread
Help[House System]!!! - by Cjgogo - 02.04.2012, 04:40
Re: Help[House System]!!! - by TzAkS. - 02.04.2012, 05:29
Respuesta: Help[House System]!!! - by Chris1337 - 02.04.2012, 05:32
Re: Help[House System]!!! - by Cjgogo - 02.04.2012, 05:47
Re: Help[House System]!!! - by TzAkS. - 02.04.2012, 06:03
Respuesta: Help[House System]!!! - by Chris1337 - 02.04.2012, 06:11
Re: Help[House System]!!! - by Cjgogo - 02.04.2012, 06:19
Re: Help[House System]!!! - by captainjohn - 02.04.2012, 06:20
Re: Help[House System]!!! - by TzAkS. - 02.04.2012, 06:35
Re: Help[House System]!!! - by Chris1337 - 02.04.2012, 06:54

Forum Jump:


Users browsing this thread: 1 Guest(s)