Is this correct?
#1

http://pastebin.com/raw/2bHhymXw

If someone tell me which line is wrong. Please provide a fix for it. thank you!
Reply
#2

line 1: Error, this is a private paste. If this is your private paste, please login to Pastebin first.
Reply
#3

Quote:
Originally Posted by jamesbond007
Посмотреть сообщение
line 1: Error, this is a private paste. If this is your private paste, please login to Pastebin first.
Hahah! Wait let me fix it.
Reply
#4

whats the problem? does it compile? are u forgetting to call mysql_tquery on query2?
Reply
#5

The connection of sql is successful, but the real problem is the data is not saved in sql

Here's the script.

http://pastebin.com/raw/D64RnmAR

And also I want to removed the Password Hash.
Reply
#6

Quote:
Originally Posted by eikzdej
Посмотреть сообщение
The connection of sql is successful, but the real problem is the data is not saved in sql

Here's the script.

http://pastebin.com/raw/D64RnmAR

And also I want to removed the Password Hash.
Why wouldn't you want to hash your passwords? Post your MySQL logs so that we can know what's the cause or else it'll be a mess to look into your whole script.
Reply
#7

Quote:
Originally Posted by Lordzy
Посмотреть сообщение
Why wouldn't you want to hash your passwords? Post your MySQL logs so that we can know what's the cause or else it'll be a mess to look into your whole script.
Here: http://pastebin.com/raw/k4jGVMKW
Reply
#8

pawn Код:
mysql_format(mysql, query, sizeof(query),
                "INSERT INTO `account_data` (`Name`, `Password`, `IP`) VALUES ('%e', '%e', '%e')", playername, Account[playerid][Password], playerip);
            mysql_format(mysql, query2, sizeof(query2),
                "INSERT INTO `character_data` (`Name`, `Admin_Level`, `VIP_Level`, `Character_Level`, `Money`, `Skin`, `Health`, `Armour`, `PosX`, `PosY`, `PosZ`, `PosA`) VALUES ('%e', 0, 0, %d, %d, %d, 100.00, 0.00, %f, %f, %f, %f)", playername, STARTING_LEVEL, STARTING_MONEY, STARTING_SKIN, STARTING_SPAWN_X, STARTING_SPAWN_Y, STARTING_SPAWN_Z, STARTING_SPAWN_A);
            mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);
You must increase your "query" array size. It's getting out of bounds here. Secondly, you need to query twice since you're formatting it twice here. You need to insert into two tables, so after your first format, query it and then format the second one for the next query.
Reply
#9

Код:
           mysql_format(mysql, query, sizeof(query),
				"INSERT INTO `account_data` (`Name`, `Password`, `IP`) VALUES ('%e', '%e', '%e')", playername, Account[playerid][Password], playerip);
			mysql_format(mysql, query2, sizeof(query2),
				"INSERT INTO `character_data` (`Name`, `Admin_Level`, `VIP_Level`, `Character_Level`, `Money`, `Skin`, `Health`, `Armour`, `PosX`, `PosY`, `PosZ`, `PosA`) VALUES ('%e', 0, 0, %d, %d, %d, 100.00, 0.00, %f, %f, %f, %f)", playername, STARTING_LEVEL, STARTING_MONEY, STARTING_SKIN, STARTING_SPAWN_X, STARTING_SPAWN_Y, STARTING_SPAWN_Z, STARTING_SPAWN_A);
            mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);
            mysql_tquery(mysql, query2, "OnAccountRegister", "i", playerid);
I did like this, but still not working. And also I increase the query array size to 512
Reply
#10

Delete the mysql_log file & start the server and try to register & show us fresh log file.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)