MySQL -
Micko123 - 25.10.2016
Hey guys. I started learning MySQL (never did it before). I faced this error
PHP код:
C:\Users\Micko\Desktop\New folder (2)\gamemodes\Untitled.pwn(14) : error 017: undefined symbol "LOG_ERROR"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
This is the line
PHP код:
mysql_log(LOG_ERROR | LOG_WARNING);
MySQL plugin i am using is latest one R41.
What could be the problem?
Re: MySQL -
Konstantinos - 25.10.2016
In R40+ versions,
LOG_ was removed so it is
ERROR | WARNING instead (which are by default anyway).
Re: MySQL -
AndySedeyn - 25.10.2016
https://sampforum.blast.hk/showthread.php?tid=616103
Quote:
Originally Posted by Tutorial
- redundant prefixes from log level enum removed:
Код:
mysql_log(LOG_ERROR | LOG_DEBUG);
becomes
Код:
mysql_log(ERROR | DEBUG);
Just remove the "LOG_" part before any log level
|
Re: MySQL -
Micko123 - 25.10.2016
Okay. Thx for that it is fixed. I started samp-server.exe and it is connected to DB. Thx m8
I am also following this tutorial. It is outdated i think. Should i keep doing it??
https://sampforum.blast.hk/showthread.php?tid=129183
Re: MySQL -
oMa37 - 25.10.2016
If you are using the MySQL R40+ then no, don't follow this tutorial.
If so, I recommend you to read these examples (with its explanations);
ClickHere.
Re: MySQL -
Micko123 - 25.10.2016
THANK YOU!
Re: MySQL -
Micko123 - 25.10.2016
Okay so i following the one you said oMa37. There is enum for players
PHP код:
enum E_PLAYERS
{
ID,
Name[MAX_PLAYER_NAME],
Password[65], // the output of SHA256_PassHash function (which was added in 0.3.7 R1 version) is always 256 bytes in length, or the equivalent of 64 Pawn cells
Salt[17],
Kills,
Deaths,
Float: X_Pos,
Float: Y_Pos,
Float: Z_Pos,
Float: A_Pos,
Interior,
Cache: Cache_ID,
bool: IsLoggedIn,
LoginAttempts,
LoginTimer
};
new Player[MAX_PLAYERS][E_PLAYERS];
Should i create columns for every of them?? And if you how should i create for this
PHP код:
Cache: Cache_ID,
bool: IsLoggedIn,
LoginAttempts,
LoginTimer
This is maybe stupid question but I never used XAMPP before xD or MySQL
Re: MySQL -
Konstantinos - 25.10.2016
The columns that should be created are from ID to Interior, the rest are for the script only. The table is created by the script though:
https://github.com/Konstantinos-Sk/S....pwn#L333-L337
Re: MySQL -
Micko123 - 25.10.2016
So should i create them in xampp or let them be created in script?
Is there any difference or what?
Re: MySQL -
Konstantinos - 25.10.2016
The script will create it itself when the server starts the first time (and connect successfully of course). Creating the table manually will take a minute or two.