SA-MP Forums Archive
MySQL undefined symbol. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL undefined symbol. (/showthread.php?tid=610104)



MySQL undefined symbol. - BigGroter - 19.06.2016

Код:
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(70) : error 017: undefined symbol "mysql"
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(70) : error 017: undefined symbol "host"
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(71) : error 017: undefined symbol "mysql"
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(93) : error 017: undefined symbol "Name"
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(93) : warning 215: expression has no effect
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(93) : error 001: expected token: ";", but found "]"
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(93) : error 029: invalid expression, assumed zero
C:\Users\Glenn\Desktop\MYSQL TEST SAMP\gamemodes\Glenn2.pwn(93) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
pawn Код:
public OnGameModeInit()
{
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG);
        mysql = mysql_connect(host, user, db, pass); //this is line 70
    if(mysql_errno(mysql) != 0) print("Could not connect to database");
    return 1;
}

Top of script:

pawn Код:
#include <a_samp>
#include <a_mysql>
#include <sscanf2>
#include <zcmd>

#if defined FILTERSCRIPT

native WP_Hash(buffer[], len, const str[]);

#define host "localhost"
#define user "root"
#define pass ""
#define db  "server"


#define dregister 6287
#define dlogin 6288
static mysql, Name[MAX_PLAYERS][24], IP[MAX_PLAYERS][16];



Re: MySQL undefined symbol. - Vince - 19.06.2016

Quote:
Код:
#if defined FILTERSCRIPT
Is it defined? If not then the compiler will ignore anything between this line and the following #else or #endif.


Re: MySQL undefined symbol. - BigGroter - 19.06.2016

Damn I'm dumb sometimes, thanks.