Raised This Month: $ Target: $400
 0% 

SQLx issue


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Min2liz
AlliedModders Donor
Join Date: Feb 2008
Location: Street
Old 03-03-2010 , 06:32   SQLx issue
Reply With Quote #1

Hi,

I'm new on amxx scripting so please don't laugh ;)

Here is a code:

Code:
                new qcolAuth = SQL_FieldNameToNum(Query, "user")
		new qcolPass = SQL_FieldNameToNum(Query, "password")
		new qcolAccess = SQL_FieldNameToNum(Query, "access")
		new qcolPoints = SQL_FieldNameToNum(Query, "points")
		
		new AuthData[44]
		new Password[44]
		new Access[32]
		new Float:Points
		
		SQL_ReadResult(Query, qcolAuth, AuthData, sizeof(AuthData)-1)
		SQL_ReadResult(Query, qcolPass, Password, sizeof(Password)-1)
		SQL_ReadResult(Query, qcolAccess, Access, sizeof(Access)-1)
		SQL_ReadResult(Query, qcolPoints, Points,0)
		
		
		
		get_user_info(id, "_pw", pass, 31)
		
		// netinka pass
		if (!equal(Password,pass)) {
			server_cmd("kick #%d Wrong pass", get_user_userid(id))
		}
		// Registruotas
		else {
			PlayerXP[id] = Points
			PlayerCon[id] = true
			log_amx("SELECT * FROM %s WHERE `user`='%s'",SQL_TABLE,name)
			log_amx("%s points: %i",AuthData,Points)
		}
Everything looks working, but Points all the time I get 0. In DB i write for example: 15, but after this I still get 0. No errors, no warnings don't get.


Sorry for bad english...
Min2liz is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode