22.08.2011, 15:21
Code:
C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1597) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1598) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1601) : error 017: undefined symbol "MEMBERTABLE" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1604) : error 017: undefined symbol "MEMBERTABLE" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1608) : error 017: undefined symbol "MEMBERTABLE" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1692) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1692) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1693) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1694) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1695) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1696) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1712) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1712) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1713) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1714) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1715) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1716) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1732) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1732) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1733) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1734) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1735) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1736) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1758) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1758) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1759) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1760) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1761) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1762) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1772) : error 017: undefined symbol "MEMBERTABLE" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1775) : error 017: undefined symbol "MEMBERTABLE" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1777) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1777) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1778) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(1779) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(2468) : error 017: undefined symbol "SMF_HOST" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(2469) : warning 202: number of arguments does not match definition C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(2776) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(5990) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6009) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6028) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6059) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6486) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6502) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6551) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6571) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6608) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(6667) : error 017: undefined symbol "mysql_retrieve_row" C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(7265) : error 025: function heading differs from prototype C:\Users\Thomas\Desktop\asdf\gamemodes\qrp.pwn(2468) : warning 204: symbol is assigned a value that is never used: "SMFConnection" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 18 Errors.
Code:
function FormatRealName(bool:_RealName, _field[], _name[], _id) { mysql_real_escape_string(_field, SQLEscape[Escape], SMFConnection); mysql_real_escape_string(_name, SQLEscape[Escape2], SMFConnection); if(_id == -1) { if(_RealName == false) { format(string, 128, "SELECT %s FROM %s WHERE memberName = '%s'", SQLEscape[Escape], MEMBERTABLE, SQLEscape[Escape2]); } else { format(string, 128, "SELECT %s FROM %s WHERE realName = '%s'", SQLEscape[Escape], MEMBERTABLE, SQLEscape[Escape2]); } } else { format(string, 128, "SELECT %s FROM %s WHERE ID_MEMBER = %i", SQLEscape[Escape], MEMBERTABLE, _id); } }
Code:
function GetMemberUMessagesByName(_name[], bool:_RealName) { FormatRealName(_RealName, "unreadMessages", _name, -1); mysql_query(string, -1, -1, SMFConnection); mysql_store_result(SMFConnection); if(mysql_num_rows(SMFConnection) == 0) return 0; SMFMemberData[unreadMessages] = mysql_fetch_int(SMFConnection); mysql_free_result(SMFConnection); return SMFMemberData[unreadMessages]; }
Code:
function GetMemberGroupByName(_name[], bool:_RealName) { FormatRealName(_RealName, "ID_GROUP", _name, -1); mysql_query(string, -1, -1, SMFConnection); mysql_store_result(SMFConnection); if(mysql_num_rows(SMFConnection) == 0) return 0; SMFMemberData[posts] = mysql_fetch_int(SMFConnection); mysql_free_result(SMFConnection); return SMFMemberData[posts]; }
Code:
function GetMemberPostsByName(_name[], bool:_RealName) { FormatRealName(_RealName, "posts", _name, -1); mysql_query(string, -1, -1, SMFConnection); mysql_store_result(SMFConnection); if(mysql_num_rows(SMFConnection) == 0) return 0; SMFMemberData[posts] = mysql_fetch_int(SMFConnection); mysql_free_result(SMFConnection); return SMFMemberData[posts]; }
Code:
function GetMemberIDByName(_name[], bool:_RealName) { FormatRealName(_RealName, "ID_MEMBER", _name, -1); mysql_query(string, -1, -1, SMFConnection); mysql_store_result(SMFConnection); if(mysql_num_rows(SMFConnection) == 0) return 0; SMFMemberData[ID_MEMBER] = mysql_fetch_int(SMFConnection); mysql_free_result(SMFConnection); return SMFMemberData[ID_MEMBER]; }
Code:
function CheckUserNameAndPassword(_name[], Password__[], bool:_RealName) { new hash[60]; strmid(hash, Password__, 0, strlen(Password__), sizeof hash); strins(hash, _name, 0, sizeof hash); for(new s; s < strlen(hash); s++) hash[s] = tolower(hash[s]); if(_RealName == false) { format(string, 128, "SELECT * FROM %s WHERE memberName='%s' AND passwd = sha1('%s')", MEMBERTABLE, _name,hash); } else { format(string, 128, "SELECT * FROM %s WHERE realName='%s' AND passwd = sha1('%s')", MEMBERTABLE, _name,hash); } mysql_query(string, -1, -1, SMFConnection); mysql_store_result(SMFConnection); if(mysql_num_rows(SMFConnection) == 0) { mysql_free_result(); return 0; } else { mysql_free_result(); return 1; } }
Code:
function ConnectServer() { print(" Connecting to the database please wait."); mysql_connect(SERVER_HOST, SERVER_USER, SERVER_DB, SERVER_PASSWORD); mysql_debug(1); if(mysql_ping() == -1) { print(" You're not connected!"); } else { print(" You're connected!"); } SMFConnection = mysql_connect(SMF_HOST, SMF_USER, SMF_DB, SMF_PASSWORD); if(mysql_ping(SMFConnection) != 1) { print("Unable to connect"); } else { print("Connected to the CSMF"); } }
Code:
function LoadPlayer(playerid) { SetPlayerFightingStyle(playerid, AccountData[playerid][FightingStyle]); if(AccountData[playerid][Reg] == 0) { for(new i = 0; i < TOTAL_GANGZONES; i ++ ) { if(GangZoneStructure[i] != -1) { GangZoneShowForPlayer(playerid, GangZoneStructure[i], ConvertZoneColor(FactionData[GangZoneData[i][gzFID]][fAreaColor])); } } SetSpawnInfo(playerid, 0, AccountData[playerid][Skin], AccountData[playerid][Spawn][0], AccountData[playerid][Spawn][1], AccountData[playerid][Spawn][2], AccountData[playerid][Spawn][3], 0,0,0,0,0,0); SetPlayerPos(playerid, 1981.7389,-1962.9572,16.6941); SetPlayerFacingAngle(playerid, 359.3499); SetPlayerVirtualWorld(playerid, playerid+1); SetPlayerCameraPos(playerid, 1982.0154,-1958.7638,16.9635); SetPlayerCameraLookAt(playerid, 1981.7389,-1962.9572,16.6941); PlayerPlaySound(playerid, NEWBIE_SOUND, 0, 0, 0); SpawnPlayer(playerid); TimerData[CharacterTimer][playerid] = SetTimerEx("ChangeCameraPos", CHARACTER_TIMER_UPDATE, 1, "d", playerid); TogglePlayerControllable(playerid, 0); SetPlayerPos(playerid, 1981.7389,-1962.9572,16.6941); SetPlayerFacingAngle(playerid, 359.3499); SetPlayerWalletCash(playerid, 500); return 1; } LoadPlayerVehicleData(playerid); SetSpawnInfo(playerid, 0, AccountData[playerid][Skin], AccountData[playerid][Spawn][0], AccountData[playerid][Spawn][1], AccountData[playerid][Spawn][2], AccountData[playerid][Spawn][3], 0,0,0,0,0,0); SpawnPlayer(playerid); SetCameraBehindPlayer(playerid); SetPlayerInterior(playerid, AccountData[playerid][InteriorSpawn]); SetPlayerVirtualWorld(playerid, AccountData[playerid][WorldSpawn]); LoadPlayerWeapons(playerid); LoadPlayerDrugs(playerid); LoadPlayerScholarships(playerid); LoadPlayerWeaponsAmmo(playerid); LoadPlayerSettings(playerid); for(new i = 0; i < TOTAL_GANGZONES; i ++ ) { if(GangZoneStructure[i] != -1) { if(PlayerSettingsData[playerid][TurfTog] == TRUE) { GangZoneShowForPlayer(playerid, GangZoneStructure[i], ConvertZoneColor(FactionData[GangZoneData[i][gzFID]][fAreaColor])); } } } SetTimerEx("GivePlayerSpawnedWeapons", SPAWN_WEAPONS_TIMER, 0, "d", playerid); SetPlayerSkin(playerid, AccountData[playerid][Skin]); TogglePlayerControllable(playerid, 0); format(string, sizeof(string), "SELECT * FROM enrolled WHERE Name = '%s'", GetUserName(playerid)); mysql_query(string); mysql_store_result(); if(mysql_num_rows() > 0) { AccountData[playerid][Enrolled] = true; if(mysql_retrieve_row()) //there are actually any rows {
Code:
case DIALOG_PICK_MAJOR: { if(!response) return 1; switch(listitem) { case 0: { SendNPCMessage(playerid, "University", "You have been enrolled in college! Go next door to get a dorm for $800 if you wish!"); format(string, sizeof(string), "INSERT INTO enrolled (Name, Major) VALUES('%s', %i)", GetUserName(playerid), MAJOR_Psychology); mysql_query(string); format(string, sizeof(string), "SELECT * FROM enrolled WHERE Name = '%s'", GetUserName(playerid)); mysql_query(string); mysql_store_result(); if(mysql_num_rows() > 0) { AccountData[playerid][Enrolled] = true; if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("Classes", string); AccountData[playerid][Classes] = strval(string); mysql_get_field("Major", string); AccountData[playerid][Major] = strval(string); }
Code:
case 1: { SendNPCMessage(playerid, "University", "You have been enrolled in college! Go next door to get a dorm for $800 if you wish!"); format(string, sizeof(string), "INSERT INTO enrolled (Name, Major) VALUES('%s', %i)", GetUserName(playerid), MAJOR_Criminal_Justice); mysql_query(string); format(string, sizeof(string), "SELECT * FROM enrolled WHERE Name = '%s'", GetUserName(playerid)); mysql_query(string); mysql_store_result(); if(mysql_num_rows() > 0) { AccountData[playerid][Enrolled] = true; if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("Classes", string); AccountData[playerid][Classes] = strval(string); mysql_get_field("Major", string); AccountData[playerid][Major] = strval(string); } } mysql_free_result(); } case 2: { SendNPCMessage(playerid, "University", "You have been enrolled in college! Go next door to get a dorm for $800 if you wish!"); format(string, sizeof(string), "INSERT INTO enrolled (Name, Major) VALUES('%s', %i)", GetUserName(playerid), MAJOR_Medicine); mysql_query(string); format(string, sizeof(string), "SELECT * FROM enrolled WHERE Name = '%s'", GetUserName(playerid)); mysql_query(string); mysql_store_result(); if(mysql_num_rows() > 0) { AccountData[playerid][Enrolled] = true; if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("Classes", string); AccountData[playerid][Classes] = strval(string); mysql_get_field("Major", string); AccountData[playerid][Major] = strval(string); }
Code:
case DIALOG_STUDENT_RECORD_MAIN: { if(!response) return 1; mysql_real_escape_string(inputtext, SQLEscape[Escape]); format(string, 256, "SELECT * FROM Accounts WHERE Name = '%s'", SQLEscape[Escape]); mysql_query(string); mysql_store_result(); if(mysql_num_rows() == 0) { mysql_free_result(); SendNPCMessage(playerid, "System", "No such name!"); return 0; } mysql_free_result(); format(string, 256, "SELECT * FROM enrolled WHERE Name = '%s'", SQLEscape[Escape]); mysql_query(string); mysql_store_result(); if(mysql_num_rows() == 0) { mysql_free_result(); SendNPCMessage(playerid, "System", "No such name!"); return 0; } new endata[18][128]; mysql_fetch_row_format(string, "|"); explode(endata, string, "|"); new pMajor[20]; switch(strval(endata[2])) { case MAJOR_Psychology: pMajor = "Psychology"; case MAJOR_Criminal_Justice: pMajor = "Criminal Justice"; case MAJOR_Medicine: pMajor = "Medicine"; } new classes; if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("Classes", string); classes = strval(string); }
Code:
mysql_free_result(); format(string, 256, "SELECT * FROM Accounts WHERE Name = '%s'", SQLEscape[Escape]); mysql_query(string); mysql_store_result(); mysql_fetch_row_format(string, "|"); explode(endata, string, "|"); new pSex[7], pnumber; switch(strval(endata[16])) { case SEX_MALE: pSex = "Male"; case SEX_FEMALE: pSex = "Female"; } if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("PhoneNumber", string); pnumber = strval(string); } format(string, sizeof(string), "Student Data\nName: %s\nSex: %s\nPhone Number: %d\n\n\nUniversity Information:\nClasses taken: %d\nMajor: %s", SQLEscape[Escape], pSex, pnumber, classes, pMajor); ShowPlayerDialog(playerid,DIALOG_STUDENT_RECORD_SDATA,DIALOG_STYLE_MSGBOX,"Student Record",string,"Search Again","Go Back"); mysql_free_result(); }
Code:
mysql_free_result(); format(string, 256, "SELECT * FROM WantedRecords WHERE Name = '%s'", SQLEscape[Escape]); mysql_query(string); mysql_store_result(); if(mysql_num_rows() > 0) { new wdata[TOTAL_RECORDS][50]; for(new i = 0; i < TOTAL_RECORDS; i ++ ) { if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("WantedFor", wdata[i]); } }
Code:
format(string, 256, "SELECT * FROM PermRecords WHERE Name = '%s'", SQLEscape[Escape]); mysql_query(string); mysql_store_result(); if(mysql_num_rows() > 0) { new pwdata[TOTAL_RECORDS][50]; for(new i = 0; i < TOTAL_RECORDS; i ++ ) { if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("WantedFor", pwdata[i]); } }
Code:
case DIALOG_SHOW_NOTE_MENU: { switch(listitem) { case 0: { ShowPlayerDialog(playerid, DIALOG_SHOW_NOTE_CREATE, DIALOG_STYLE_INPUT, "Notes", "Type in the text you would like to save.", "Insert", "Cancel"); } case 1: { ShowPlayerDialog(playerid, DIALOG_SHOW_NOTE_DELETE, DIALOG_STYLE_INPUT, "Notes", "Type in the id of the note (Check View, to check the id)", "Delete", "Cancel"); } case 2: { format(string, 256, "SELECT * FROM Notes WHERE Name = '%s'", GetUserName(playerid)); mysql_query(string); mysql_store_result(); if(mysql_num_rows() > 0) { new noteids[TOTAL_NOTES_PER_PERSON], NoteData[TOTAL_NOTES_PER_PERSON][128]; for(new i = 0; i < TOTAL_NOTES_PER_PERSON; i ++ ) { if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("NoteID", string); noteids[i] = strval(string); mysql_get_field("Note", NoteData[i]); } }
Code:
case DIALOG_SHOW_NOTE_SHOW_2: { sscanfid[2] = strval(inputtext); format(string, 200, "SELECT * FROM Notes WHERE Name = '%s' AND NoteID = %i", GetUserName(playerid), sscanfid[2]); mysql_query(string); mysql_store_result(); if(mysql_num_rows() == 0) return SendClientMessage(playerid, COLOR_SYSTEM, "[Error]: You don't own that note, or it doesn't exist."); if(mysql_num_rows() > 0) { new noteidsh, NoteDatah[128]; if(mysql_retrieve_row()) //there are actually any rows { mysql_get_field("NoteID", string); noteidsh = strval(string); mysql_get_field("Note", NoteDatah); }
Code:
public OnQueryFinish( query[], resultid, extraid, connectionHandle ) { switch(resultid) { case MYSQL_SAVE_VEHICLES: { } case MYSQL_SAVE_USERS: { } case MYSQL_LOAD_OOC_ROOMS: { mysql_store_result(); if(mysql_num_rows() == 0) { print("No chatrooms in the database! Creating OOC Rooms!"); for(new i = 0; i < TOTAL_OOCROOMS; i ++ ) { mysql_query("INSERT INTO OOCRooms (Owned, Locked, Owner, Password, Owner) VALUES(0,0,'None','None', 'None')"); printf("Created OOC room %i | Data: Owned: False, Locked: False, Owner: None, Password: None", i); } }
Code:
public OnQueryFinish( query[], resultid, extraid, connectionHandle ) { switch(resultid) { case MYSQL_SAVE_VEHICLES: { } case MYSQL_SAVE_USERS: { } case MYSQL_LOAD_OOC_ROOMS: { mysql_store_result(); if(mysql_num_rows() == 0) { print("No chatrooms in the database! Creating OOC Rooms!"); for(new i = 0; i < TOTAL_OOCROOMS; i ++ ) { mysql_query("INSERT INTO OOCRooms (Owned, Locked, Owner, Password, Owner) VALUES(0,0,'None','None', 'None')"); printf("Created OOC room %i | Data: Owned: False, Locked: False, Owner: None, Password: None", i); } }
-Thomas Reck