03.08.2013, 21:25
(
Последний раз редактировалось Blademaster680; 05.08.2013 в 06:04.
Причина: More detailed title
)
Resolved
It wasnt inserting into the table when someone registers
I dont think mysql is connecting to the Database
It isnt logging anything except
This is the code:
It wasnt inserting into the table when someone registers
I dont think mysql is connecting to the Database
It isnt logging anything except
Код:
[Sat Aug 03 16:43:09 2013] ------------------------- [Sat Aug 03 16:43:09 2013] Logging Started [Sat Aug 03 16:43:09 2013] ------------------------- [Sat Aug 03 16:47:41 2013] ------------------------- [Sat Aug 03 16:47:41 2013] Logging Ended [Sat Aug 03 16:47:41 2013] -------------------------
Код:
public OnGameModeInit() { mysql_connect("Hostname", "Username", "Password", "Database"); SetGameModeText("gamemode"); AddPlayerClass(299, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; }
Код:
stock SavePlayer(playerid) { new query[126], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); GetPlayerPos(playerid, Player[playerid][Position][0], Player[playerid][Position][1], Player[playerid][Position][2]); format(query, sizeof(query), "UPDATE accounts SET Name = '%s', Password = '%s', PlayerX = '%f', PlayerY = '%f', PlayerZ = '%f' WHERE name = '%s'", pName, Player[playerid][Password], Player[playerid][Position][0], Player[playerid][Position][1], Player[playerid][Position][2], pName); mysql_query(query); printf("Player ID %d (%s)has been saved", playerid, pName); }