19.10.2013, 16:08
getting 2 errors :
I do not understand the errors
But they are on the following lines;
Код:
C:\Documents and Settings\Administrator\桌面\FCRP.pwn(236) : warning 217: loose indentation C:\Documents and Settings\Administrator\桌面\FCRP.pwn(248) : error 035: argument type mismatch (argument 3) C:\Documents and Settings\Administrator\桌面\FCRP.pwn(273) : warning 217: loose indentation C:\Documents and Settings\Administrator\桌面\FCRP.pwn(280) : warning 217: loose indentation C:\Documents and Settings\Administrator\桌面\FCRP.pwn(285) : error 035: argument type mismatch (argument 3) C:\Documents and Settings\Administrator\桌面\FCRP.pwn(287) : warning 217: loose indentation C:\Documents and Settings\Administrator\桌面\FCRP.pwn(481) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Код:
public OnPlayerConnect(playerid) { mysql_format(1, query, "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 0,1", GetName(playerid)); mysql_function_query(1, query, true, "CheckPlayer", "i", playerid); return 1; } // Kijkt of iemand in de database staat Vervolgens inloggen of registreren forward CheckPlayer(playerid); public CheckPlayer(playerid) { new rows, fields, string[128]; cache_get_data(rows, fields); if(!rows) { format(string, sizeof(string), "{FFFFFF}Welcome {A3FF00}%s{FFFFFF} on my server. Input your password and register account.", GetName(playerid)); ShowPlayerDialog(playerid, 0, DIALOG_STYLE_PASSWORD, "Registration", string, "Registration", "Quit"); } else { new temp[12]; cache_get_row(0, 1, temp); PlayerInfo[playerid][pSQLid] = strval(temp); cache_get_row(0, 2, PlayerInfo[playerid][pPass]); cache_get_row(0, 3, temp); PlayerInfo[playerid][pMoney] = strval(temp); format(string, sizeof(string), "{FFFFFF}Welcome back {A3FF00}%s{FFFFFF}, your account is ready for use. Input your password and login.", GetName(playerid)); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Quit"); } return 1; } //Maakt een row aan met account info en zet die vervolgens in de database forward OnAccountCreate(playerid); public OnAccountCreate(playerid) { PlayerInfo[playerid][pSQLid] = mysql_insert_id(); return 1; } //als iemand disconnect Shit opslaan in de database public OnPlayerDisconnect(playerid, reason) { mysql_format(1, query, "UPDATE `players` SET `Money` = '%d' WHERE `Name` = '%e' LIMIT 1", GetPlayerMoney(playerid), GetName(playerid)); mysql_function_query(1, query, false, "", ""); return 1; }
But they are on the following lines;
Код:
mysql_format(1, query, "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 0,1", GetName(playerid)); mysql_format(1, query, "UPDATE `players` SET `Money` = '%d' WHERE `Name` = '%e' LIMIT 1", GetPlayerMoney(playerid), GetName(playerid));