enums and database saving
#1

i just started working on a clan system and i hit a bump in the road
i just tried to get a clan to create in the database and i did this and i am getting the error
error 017: undefined symbol "clanid".i know what it means,where i define this,i tried to use this the same way i use playerid.
it would mean a lot if u would help me and not send me on some site.

#define MAX_CLANS (100)

enum cInfo{
cID,
cName[MAX_CLAN_NAME]
}
new ClanInfo[MAX_CLANS][cInfo];


#define cNamex 48

function UpdateClanVariable(clanid, varid)
{
new query[256];
switch(varid){
case cNamex: format(query, sizeof(query), "UPDATE `clans` SET `ClanName`='%s' WHERE `ID`='%d'", ClanInfo[clanid][cName], ClanInfo[clanid][cID]);
}

mysql_tquery(mysql, query, "", "");
return 1;
}


ClanInfo[clanid][cName] = cache_get_field_content_int(0, "ClanName", mysql);
Reply


Messages In This Thread
enums and database saving - by bosmania - 25.02.2019, 18:44
Re: enums and database saving - by feartonyb - 26.02.2019, 11:29
Re: enums and database saving - by bosmania - 26.02.2019, 12:13
Re: enums and database saving - by bosmania - 26.02.2019, 13:00
Re: enums and database saving - by bosmania - 26.02.2019, 13:03
Re: enums and database saving - by feartonyb - 26.02.2019, 18:26
Re: enums and database saving - by bosmania - 27.02.2019, 15:16

Forum Jump:


Users browsing this thread: 3 Guest(s)