Lots of errors on SQLite..
#5

You have used "field_assoc", that means that the second parameter is the name of the field but you can retrieve the last inserted ID using the field functions. The second parameter is 0 (for fieldid) but since there are no more selected, it's 0 by default:
pawn Код:
User[playerid][P_ID] = db_get_field_int(Result);
---

pawn Код:
User[playerid][P_ID] = db_get_field_assoc_int(Result, "userid", P_ID, sizeof P_ID); //2 Errors on Line 163
User[playerid][P_RANK] = db_get_field_assoc_int(Result, "admin", P_RANK, sizeof P_RANK); //2 Errors on Line 164
P_ID and P_RANK are constants used in the enumerator and actually there's no reason to try get the size (which you would have to manually specify it) as they're not strings. That would be:
pawn Код:
User[playerid][P_ID] = db_get_field_assoc_int(Result, "userid");
User[playerid][P_RANK] = db_get_field_assoc_int(Result, "admin");
Quote:
Originally Posted by Sreyas
Посмотреть сообщение
PHP код:
if(!(<= strlen(inputtext) <= 20)) 
thats incorrect man 5 is a constant you have to use &&
like this
PHP код:
if(strlen(inputtext)>=&& strlen(inputtext) <=20
It's correct and it is used to avoid calling strlen twice.
Reply


Messages In This Thread
[SOLVED] Lots of errors on SQLite.. - by ChristolisTV - 19.06.2016, 09:13
Re: Lots of errors on SQLite.. - by K0P - 19.06.2016, 09:20
Re: Lots of errors on SQLite.. - by ChristolisTV - 19.06.2016, 09:24
Re: Lots of errors on SQLite.. - by SyS - 19.06.2016, 09:32
Re: Lots of errors on SQLite.. - by Konstantinos - 19.06.2016, 13:13
Re: Lots of errors on SQLite.. - by ChristolisTV - 19.06.2016, 16:04
Re: Lots of errors on SQLite.. - by SyS - 22.06.2016, 02:40

Forum Jump:


Users browsing this thread: 1 Guest(s)