Skripta:MojMod od 0
Opis Problema:Kad sam ubacivao da mi u MySQL da mi sprema admin i GM level dobio sam errore
Dio Skripte:if(dialogid == 15000)
{
if(response)
{
new Query, Pname;
GetPlayerName(playerid, Pname, 24);
new escpname;
mysql_real_escape_string(Pname, escpname);
format(Query, sizeof(Query), "SELECT * FROM `playerinfo` WHERE `user` = '%s' AND `password` = '%s'", escpname, inputtext);
mysql_query(Query);
mysql_store_result();
if(!mysql_num_rows())
{
SendClientMessage(playerid, 0xF60000AA, "Invalid password!");
SetPVarInt(playerid, "WrongPass", GetPVarInt(playerid, "WrongPass") + 1);
ShowPlayerDialog(playerid, 15000, DIALOG_STYLE_INPUT , "Login", "This account is registered, please login", "OK", "Cancel");
if(GetPVarInt(playerid, "WrongPass") == 3)
{
SendClientMessage(playerid, 0xF60000AA, "Max password tries exceeded!!");
Kick(playerid);
}
}
else
{
new line; //I know it's big D=
if(mysql_fetch_row(line)) //Fetches the line
{
new data; //The data strings
new data2; //The data variables
sscanf(line, "p|ssdddds", data, data, data2, data2, data2, data2, data, data, data); // linija 268
SetPVarInt(playerid, "Kills", data2); //Sets Pvar ints
SetPVarInt(playerid, "Logged", 1); //Sets Pvar ints
SetPVarInt(playerid, "Deaths", data2); //Sets Pvar ints
SetPlayerScore(playerid, data2); //Sets players score
SetPVarInt(playerid, "MoneyGiven", data2); //Sets players cash
SetPVarInt(playerid, "Admin", data); //linija 274
SetPVarInt(playerid, "GameMaster", data); //linija 275
SendClientMessage(playerid, 0x0000D9AA, "Prijavljen!");
mysql_free_result();
}
}
}
}
return 1;
}
Errori...
C:\Users\Sa-Mp\Desktop\BNRP\gamemodes\MojMod.pwn(26😎 : error 032: array index out of bounds (variable "data")
C:\Users\Sa-Mp\Desktop\BNRP\gamemodes\MojMod.pwn(274) : error 032: array index out of bounds (variable "data")
C:\Users\Sa-Mp\Desktop\BNRP\gamemodes\MojMod.pwn(275) : error 032: array index out of bounds (variable "data")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
[Pomoc]Errori
3,593
pregleda
13
postova
4. Jul 2011.
Sad su samo ove dvije zadnje linije a errori su
C:\Users\Sa-Mp\Desktop\BNRP\gamemodes\MojMod.pwn(274) : error 035: argument type mismatch (argument 3)
C:\Users\Sa-Mp\Desktop\BNRP\gamemodes\MojMod.pwn(275) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
C:\Users\Sa-Mp\Desktop\BNRP\gamemodes\MojMod.pwn(274) : error 035: argument type mismatch (argument 3)
C:\Users\Sa-Mp\Desktop\BNRP\gamemodes\MojMod.pwn(275) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Godfather
Novi Član
240 / 250 XP
🌱Početnik(0)
2,079
Postovi:
24
Teme:
Pridružio se:Feb. 2011
4. Jul 2011.
evo ti rijeseno:
sscanf(line, "p<|>dddddd", data, data, data, data, data, data); // linija 268
SetPVarInt(playerid, "Kills", data); //Sets Pvar ints
SetPVarInt(playerid, "Logged", 1); //Sets Pvar ints
SetPVarInt(playerid, "Deaths", data); //Sets Pvar ints
SetPlayerScore(playerid, data); //Sets players score
SetPVarInt(playerid, "MoneyGiven", data); //Sets players cash
SetPVarInt(playerid, "Admin", data); //linija 274
SetPVarInt(playerid, "GameMaster", data); //linija 275
sscanf(line, "p<|>dddddd", data, data, data, data, data, data); // linija 268
SetPVarInt(playerid, "Kills", data); //Sets Pvar ints
SetPVarInt(playerid, "Logged", 1); //Sets Pvar ints
SetPVarInt(playerid, "Deaths", data); //Sets Pvar ints
SetPlayerScore(playerid, data); //Sets players score
SetPVarInt(playerid, "MoneyGiven", data); //Sets players cash
SetPVarInt(playerid, "Admin", data); //linija 274
SetPVarInt(playerid, "GameMaster", data); //linija 275
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava