Help me please
#1

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)
Reply
#2

Could you show me format for :
pawn Код:
Houses[NewHouseID][pHouseName]
Reply
#3

In the enum it's

pawn Код:
pHouseName[24],
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;
}
Reply
#4

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);
Reply
#5

No, because I do it for creating the new house.

It's NewHouseID on the /createhouse command, as it's creating a new house.
Reply
#6

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[] ...
Reply
#7

I've done that, now the houses aren't saving?

Any help please?
Reply
#8

is this
pawn Код:
stock AddHouseToFile(HouseName, HouseOwner, HousePrice, Float:ExteriorX, Float:ExteriorY, Float:ExteriorZ, Float:InteriorX, Float:InteriorY, Float:InteriorZ)
line 502 ?
Reply
#9

No. That's line, 1090.
Reply
#10

then what's line 502 ?
Код:
Line (502) : error 035: argument type mismatch (argument 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)