#1

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 017undefined symbol "LOG_ERROR"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB 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?
Reply
#2

In R40+ versions, LOG_ was removed so it is ERROR | WARNING instead (which are by default anyway).
Reply
#3

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
Reply
#4

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
Reply
#5

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.
Reply
#6

THANK YOU!
Reply
#7

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,
    
FloatX_Pos,
    
FloatY_Pos,
    
FloatZ_Pos,
    
FloatA_Pos,
    
Interior,
    
CacheCache_ID,
    
boolIsLoggedIn,
    
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 код:
CacheCache_ID,
    
boolIsLoggedIn,
    
LoginAttempts,
    
LoginTimer 
This is maybe stupid question but I never used XAMPP before xD or MySQL
Reply
#8

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
Reply
#9

So should i create them in xampp or let them be created in script?
Is there any difference or what?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)