09.11.2014, 14:05
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:
Examples of where the error occurs:
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.
Код:
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);