Help me please -
iGetty - 13.01.2012
pawn Код:
AddHouseToFile(HouseName, HouseOwner, HousePrice, Float:ExteriorX, Float:ExteriorY, Float:ExteriorZ, Float:InteriorX, Float:InteriorY, Float:InteriorZ); //Line 502
I have that ^
I also have this:
pawn Код:
new HouseName[24], HouseOwner[24];
And:
pawn Код:
new string[256];
Houses[NewHouseID][pHouseOwner] = format(string, 24, "Nobody");
for(new i = 0; i < MAX_HOUSES; i++)
{
Houses[NewHouseID][pHouseName] = format(string, 24, "House %i.", i);
}
With this error:
Line (502) : error 035: argument type mismatch (argument 1)
Re: Help me please -
CmZxC - 13.01.2012
Could you show me format for :
pawn Код:
Houses[NewHouseID][pHouseName]
Re: Help me please -
iGetty - 13.01.2012
In the enum it's
In the /createhouse command it's
pawn Код:
for(new i = 0; i < MAX_HOUSES; i++)
{
Houses[NewHouseID][pHouseName] = format(string, 24, "House %i.", i);
}
In the AddHousesToFile its
pawn Код:
stock AddHousesFromFiles()
{
new
HouseName[24]
In another part of the addhousesfromfile it's
pawn Код:
while(mysql_fetch_row(Str))
{
sscanf(Str, "s[24]s[24]dffffff", HouseName, HouseOwner, HousePrice, ExteriorX, ExteriorY, ExteriorZ, InteriorX, InteriorY, InteriorZ);
In AddHouseToFile it's
pawn Код:
stock AddHouseToFile(HouseName, HouseOwner, HousePrice, Float:ExteriorX, Float:ExteriorY, Float:ExteriorZ, Float:InteriorX, Float:InteriorY, Float:InteriorZ)
{
new
Query[1024];
format(Query, sizeof(Query), "INSERT INTO `houses` (HouseName[24], HouseOwner[24], HousePrice, ExteriorX, ExteriorY, ExteriorZ, InteriorX, InteriorY, InteriorZ) VALUES(%s[24], %s[24, %d, %f, %f, %f, %f, %f, %f)",
HouseName, HouseOwner, HousePrice, ExteriorX, ExteriorY, ExteriorZ, InteriorX, InteriorY, InteriorZ);
mysql_query(Query);
mysql_free_result();
return 1;
}
Re: Help me please -
CmZxC - 13.01.2012
wth is NewHouseID ? Isn't it easier just to use "i" ?
pawn Код:
Houses[NewHouseID][pHouseName] = format(string, 24, "House %i.", i);
into
pawn Код:
Houses[i][pHouseName] = format(string, 24, "House %i.", i);
Re: Help me please -
iGetty - 13.01.2012
No, because I do it for creating the new house.
It's NewHouseID on the /createhouse command, as it's creating a new house.
Re: Help me please -
CmZxC - 13.01.2012
pawn Код:
stock AddHouseToFile(HouseName, HouseOwner, HousePrice, Float:ExteriorX, Float:ExteriorY, Float:ExteriorZ, Float:InteriorX, Float:InteriorY, Float:InteriorZ)
Housename = string .. must be Housename[], same for HouseOwner[] ...
Re: Help me please -
iGetty - 13.01.2012
I've done that, now the houses aren't saving?
Any help please?
Re: Help me please -
CmZxC - 13.01.2012
is this
pawn Код:
stock AddHouseToFile(HouseName, HouseOwner, HousePrice, Float:ExteriorX, Float:ExteriorY, Float:ExteriorZ, Float:InteriorX, Float:InteriorY, Float:InteriorZ)
line 502 ?
Re: Help me please -
iGetty - 13.01.2012
No. That's line, 1090.
Re: Help me please -
CmZxC - 13.01.2012
then what's line 502 ?
Код:
Line (502) : error 035: argument type mismatch (argument 1)