Undefined Symbol Issue.
#1

I'm really new to scripting and trying to edit scripts to learn as I go. I'm using MySQL and I've ran into an issue when compiling. Can someone help me fix this?

Errors when compiling:
Код:
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(1689) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(1698) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(1710) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(1810) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(1863) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(2563) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(2586) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(2605) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(2648) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(2673) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(2706) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3081) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3095) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3159) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3190) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3204) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3266) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3338) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3388) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3433) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3454) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3501) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3544) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3684) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3698) : error 017: undefined symbol "mysql_function_query"
C:\Documents and Settings\Administrator\Desktop\SCRP\gamemodes\roleplay.pwn(3724) : error 017: undefined symbol "mysql_function_query"

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


26 Errors.
Examples of where the error occurs:
Код:
SQL_CreateAccount(const username[], const password[])
{
	static
	    query[512],
	    buffer[129];

	WP_Hash(buffer, sizeof(buffer), password);

	format(query, sizeof(query), "INSERT INTO `accounts` (`Username`, `Password`, `RegisterDate`, `LoginDate`) VALUES('%s', '%s', '%s', '%s')", username, buffer, ReturnDate(), ReturnDate());
	mysql_function_query(g_iHandle, query, false, "", "");
}

SQL_CheckAccount(playerid)
{
	static
	    query[128];

    format(query, sizeof(query), "SELECT `Username` FROM `characters` WHERE `Character` = '%s'", ReturnName(playerid));
	mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", playerid, THREAD_FIND_USERNAME);
}

SQL_AttemptLogin(playerid, const password[])
{
	static
		query[300],
		buffer[129];

	WP_Hash(buffer, sizeof(buffer), password);

	format(query, sizeof(query), "SELECT `ID` FROM `accounts` WHERE `Username` = '%s' AND `Password` = '%s'", PlayerData[playerid][pUsername], buffer);
    mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", playerid, THREAD_LOGIN);
Reply
#2

add
pawn Код:
}
in the end
Reply
#3

Код:
#Include <a_mysql>
1. add that to your script the above line to your script if you haven't already.
2. Edit server.cfg and add a line called plugin mysql
3. Create a folder called plugins in the samp directory (if not already there)
3. move the the .dll file inside the folder i attached (if your linux tell me as you need .so file)
4. move the a_mysql.inc file to your pawno includes folder.
5. recompile... should be working now


edit: I listed it better now
Darren
Reply
#4

It is in the end, this happens 26 times, it's all the same issue. I only posted a few as an example to save all of us some time.
Reply
#5

Quote:
Originally Posted by dazman14
Посмотреть сообщение
Код:
#Include <a_mysql>
add that to your script. Edit server.cfg and add plugin mysql and add the .dll file i attached to the plugins folder. also move a_mysql in the attachement to your pawno/includes folder.

edit: If it was the } which was the problem great. I assumed you miss-copied the file. and missed out the }

Darren
Sadly, this is all already done. That's why I'm so confused about the issue.
Reply
#6

So you have the correct plugin?

makesure you do the above steps i re-edited for ease of reading. Your <a_mysql> include may be outdated or the .dll plugin may be... Just copy the current ones to your desktop and try steps to find out...
Reply
#7

I'm positive I'm using the correct plugin.
Reply
#8

Quote:
Originally Posted by FeaRXPhobia
Посмотреть сообщение
I'm positive I'm using the correct plugin.
makesure you do the above steps i re-edited for ease of reading. Your <a_mysql> include may be outdated or the .dll plugin may be... Just copy the current ones to your desktop and try steps to find out...


even if your positive it won't harm you to do the above as its more than likely the include file inside your pawno includes isn't correct. anyway as i said won't hurt to do it. attachment is on above post.
Reply
#9

After going through all the steps, I'm still having the same 26 errors, sadly :/
Reply
#10

Quote:
Originally Posted by FeaRXPhobia
Посмотреть сообщение
After going through all the steps, I'm still having the same 26 errors, sadly :/
I'm affraid I have no idea why this is occuring.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)