Is this correct?
#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


Messages In This Thread
Is this correct? - by eikzdej - 14.01.2017, 03:12
Re: Is this correct? - by jamesbond007 - 14.01.2017, 03:14
Re: Is this correct? - by eikzdej - 14.01.2017, 03:14
Re: Is this correct? - by jamesbond007 - 14.01.2017, 03:21
Re: Is this correct? - by eikzdej - 14.01.2017, 03:35
Re: Is this correct? - by Lordzy - 14.01.2017, 04:28
Re: Is this correct? - by eikzdej - 14.01.2017, 04:37
Re: Is this correct? - by Lordzy - 14.01.2017, 04:47
Re: Is this correct? - by eikzdej - 14.01.2017, 05:29
Re: Is this correct? - by iLearner - 14.01.2017, 05:39

Forum Jump:


Users browsing this thread: 1 Guest(s)