[Pomoc]Errori

Započeo FireMan
4. Jul 2011. Zaključano
3,593
pregleda
13
postova
Dave
5
Underboss
4. Jul 2011.
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.
Mr.Lowrey
5
Godfather
4. Jul 2011.
linije?
| Pacino
4
Made Man
4. Jul 2011.
Stavi umjesto
new data; //The data strings


ovo:
new data; //The data strings
Dave
5
Underboss
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.
Mr.Lowrey
5
Godfather
4. Jul 2011.
imas tut u pdf tutoriali za taj warn pa sam rjesi!
Dave
5
Underboss
4. Jul 2011.
Citaj malo,to je Error
| Pacino
4
Made Man
4. Jul 2011.
daj te linije
Mr.Lowrey
5
Godfather
4. Jul 2011.
to je isto sto i number of arguments does not match the definition, da ima eng.bar 3 znao bi sto znaci
Dave
5
Underboss
4. Jul 2011.
Argument Type Missmatch
| Pacino
4
Made Man
4. Jul 2011.
To je fulio deklaraciju, tj. stavio je npr. float vrijednost gdje treba integer i sl.
i sada daj kod da vidim sta je :S
Luis
5
Godfather
4. Jul 2011.
Dobro postaj te linije an kojem ti izbaci to.
Dave
5
Underboss
4. Jul 2011.
RIJESIO MOZE LOCK

Koristio sam string umjesto varijable
| Pacino
4
Made Man
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 

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha