Getting an error in format.
#1

Hey, i am getting error in using format for my sqlite database...
here is the code:

Код:
new query[500],name[50];
	GetPlayerName(playerid,name,sizeof(name));
	rand = randomEx(1000,9999);
	GetPlayerPos(playerid,x,y,z);
 	format(query,sizeof(query),"INSERT INTO `USERS`(`Name`,`Password`,`LoggedIn`,`Level`,`Admin`,`VIP`,`Money`,`Score`,`Death`,`Number`,`X`,`Y`,`Z`) VALUES('%s','%s','1','0','0','0','30000','0','0','%d','%.2f','%.2f','%.2f')",DB_Escape(name),DB_Escape(password),rand,x,y,z);
Error is:
Код:
error 035: argument type mismatch (argument 1)
Error is on the last line... please help
Reply
#2

BUMP... help please....
Reply
#3

Show the full command / function
Reply
#4

ok....
Код:
stock RegisterPlayer(playerid,const password[])
{
	new Float:x,Float:y,Float:z,rand;
	new query[500],name[50];
	GetPlayerName(playerid,name,sizeof(name));
	rand = randomEx(1000,9999);
	GetPlayerPos(playerid,x,y,z);
 	format(query,sizeof(query),"INSERT INTO `USERS`(`Name`,`Password`,`LoggedIn`,`Level`,`Admin`,`VIP`,`Money`,`Score`,`Death`,`Number`,`X`,`Y`,`Z`) VALUES('%s','%s','1','0','0','0','30000','0','0','%d','%.2f','%.2f','%.2f')",DB_Escape(name),DB_Escape(password),rand,x,y,z);
	db_query(users,query);
Reply
#5

new users; then why db_query(users, query)
Reply
#6

users is new DB:users; and format is the thing which has problem... dont know why
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)