Mysql cache_get_field_content undefined symbol
#1

Код:
cache_get_field_content(i, "Owner");
error 017: undefined symbol "Owner"

cache_get_field_content parameters :
(row, const field_name[], destination[], connectionHandle = 1, max_len = sizeof(destination))

WTF
Reply
#2

Can you show some more code?
A few lines above this one and a few below it as well?
Reply
#3

Quote:
Originally Posted by AmigaBlizzard
Посмотреть сообщение
Can you show some more code?
A few lines above this one and a few below it as well?
Код:
for(new i; i<47; i++)
{
HouseInfo[houseid][ID] = cache_get_field_content_int(i, "HouseID");
HouseInfo[houseid][hEnterX] = cache_get_field_content_float(i, "EnterX");
HouseInfo[houseid][hEnterY] = cache_get_field_content_float(i, "EnterY");
HouseInfo[houseid][hEnterZ] = cache_get_field_content_float(i, "EnterZ");
HouseInfo[houseid][hExitX] = cache_get_field_content_float(i, "ExitX");
HouseInfo[houseid][hExitY] = cache_get_field_content_float(i, "ExitY");
HouseInfo[houseid][hExitZ] = cache_get_field_content_float(i, "ExitZ");
HouseInfo[houseid][hInsideInt] = cache_get_field_content_int(i, "InsideInt");
HouseInfo[houseid][hInsideVir] = cache_get_field_content_int(i, "InsideVir");
HouseInfo[houseid][hOutsideInt] = cache_get_field_content_int(i, "OutsideInt");
HouseInfo[houseid][hOutsideVir] = cache_get_field_content_int(i, "OutsideVir");
HouseInfo[houseid][hOwned] = cache_get_field_content_int(i, "Owned");
HouseInfo[houseid][hLocked] = cache_get_field_content_int(i, "Hlocked");
HouseInfo[houseid][hInventory] = cache_get_field_content_int(i, "HouseInventory");
HouseInfo[houseid][hSecurity] = cache_get_field_content_int(i, "HouseSecurity");
HouseInfo[houseid][hPrice] = cache_get_field_content_int(i, "Price");
HouseInfo[houseid][hType] = cache_get_field_content_int(i, "HouseType");
HouseInfo[houseid][hQuality] = cache_get_field_content_int(i, "HouseQuality");
cache_get_field_content(i, "Owner", HouseInfo[houseid][Owner]);
}
Reply
#4

bump
Reply
#5

Код:
 HouseInfo[houseid][Owner] = cache_get_field_content(i, "Owner");
Or

Код:
 
new HouseOwner[1024];
cache_get_field_content(i, "Owner", HouseOwner);
HouseInfo[houseid][Owner] = HouseOwner;
Reply
#6

Quote:
Originally Posted by Prokill911
Посмотреть сообщение
Код:
 HouseInfo[houseid][Owner] = cache_get_field_content(i, "Owner");
Or

Код:
 
new HouseOwner[1024];
cache_get_field_content(i, "Owner", HouseOwner);
HouseInfo[houseid][Owner] = HouseOwner;
I still get

error 017: undefined symbol "Owner"
Reply
#7

it's impossible to get an undefined symbol error of something between brackets and defined as a string, for me it seems that the error is from the houseinfo array, check its enum and make sure that you have defined "Owner" variable in that enum as a string, be cause you are using cache_get_field_content function which the strings get retrieved from the db by, so make sure it's:
Код:
Owner[MAX_PLAYER_NAME],
in the houseinfo enum.
plus, remember that strings variables' value gets edited by formatting it, '=' operator isn't the way to do that.
Reply
#8

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
it's impossible to get an undefined symbol error of something between brackets and defined as a string, for me it seems that the error is from the houseinfo array, check its enum and make sure that you have defined "Owner" variable in that enum as a string, be cause you are using cache_get_field_content function which the strings get retrieved from the db by, so make sure it's:
Код:
Owner[MAX_PLAYER_NAME],
in the houseinfo enum.
plus, remember that variables' value gets edited by formatting it, '=' operator isn't the way to do that.
You were right, thanks.

Problem was here HouseInfo[houseid][Owner] I forgot that I named it in enum as "hOwner"
Reply
#9

For a more complete use of MySQL, you can use the allotted functions used for specific value types. Example..



FactionID is just a numerical value where FactionName is a string. (also, I use the optional parameters.. it is not required or necessary)

I guess this response is more directed towards ProKill.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)