sqlite format error
#1

I can't seem to figure it out.

Quote:
Код:
C:\Users\User\Dropbox\script\gamemodes\DM.pwn(1439) : error 012: invalid function call, not a valid address
C:\Users\User\Dropbox\script\gamemodes\DM.pwn(1439) : warning 215: expression has no effect
C:\Users\User\Dropbox\script\gamemodes\DM.pwn(1439) : error 001: expected token: ";", but found ")"
C:\Users\User\Dropbox\script\gamemodes\DM.pwn(1439) : error 029: invalid expression, assumed zero
C:\Users\User\Dropbox\script\gamemodes\DM.pwn(1439) : fatal error 107: too many error messages on one line
Quote:
Код:
format(Query, sizeof(Query), "INSERT INTO `BANNED` (`NAME`, `IP`, `REASON`, `ADMIN`, `DATE`, `TIME`) VALUES ('%s', '0', '%s', '%s', '%s', '%s')", DB_Escape(pName1), reason, DB_Escape(pName1(playerid)), datestring, timestring);
Reply
#2

I think I found my problem but still not fixing the error.
Код:
stock pName(playerid)
{
	new GetName[24];
	GetPlayerName(playerid, GetName, 24);
	return GetName;
}
Reply
#3

I no longer need help I fixed the problem.
Reply
#4

You no longer need to use DB_Escape, You can the %q. (Replace the %s)
Reply
#5

ERROR:

Код:
 format(Query, sizeof(Query), "INSERT INTO `BANNED` (`NAME`, `IP`, `REASON`, `ADMIN`, `DATE`, `TIME`) VALUES ('%s', '0', '%s', '%s', '%s', '%s')", DB_Escape(pName1), reason, DB_Escape(pName1(playerid)), datestring, timestring);
->

Код:
 format(Query, sizeof(Query), "INSERT INTO `BANNED` (`NAME`, `IP`, `REASON`, `ADMIN`, `DATE`, `TIME`) VALUES ('%s', '0', '%s', '%s', '%s', '%s')", DB_Escape(pName1(your_variable)), reason, DB_Escape(pName1(playerid)), datestring, timestring);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)