08.03.2014, 20:53
Hi,
I'm trying to get the ID of a new house and I did this:
In my createhouse CMD, the World of the house = the new ID.
So I got something like this:
mInfo[m][mWorld] = GetNewHouseID();
But it always give me 1 as ID.
I think that is cause I did "return 1".
But how could I return the value from my public ?
I mean "return id;" but from my public.
Thank you !
I'm trying to get the ID of a new house and I did this:
Код:
stock GetNewHouseID() { new query[128]; mysql_format(mysql, query, sizeof(query), "SELECT * FROM `maisons`"); mysql_tquery(mysql, query, "OnGetHouseID", ""); return 1; } public OnGetHouseID() { new rows, fields; cache_get_data(rows, fields, mysql); if(rows) { new id = cache_get_row_count(); return id; // Here it gives me the good ID. } return ID_MAISON_INVALIDE; }
In my createhouse CMD, the World of the house = the new ID.
So I got something like this:
mInfo[m][mWorld] = GetNewHouseID();
But it always give me 1 as ID.
I think that is cause I did "return 1".
But how could I return the value from my public ?
I mean "return id;" but from my public.
Thank you !