Szerző Téma: ProLine FreeRoam mód, mentési-betöltési hiba.  (Megtekintve 635 alkalommal)

ᗩωєѕσмє

  • Vendég
ProLine FreeRoam mód, mentési-betöltési hiba.
« Dátum: 2015. Július 22. - 20:56:03 »
+1 Show voters
Üdvözletem! Megtaláltam a Pedró. által elkészített ProLine FreeRoam játékmódot+sql táblákat. A játékmódot beüzemeltem elindult, tehát megy rendesen. De egy baj van vele. Semmit sem ment el/nem tölt be. Már kérdeztem efelöl Pedró-t is, de nem válaszolt egyetlen üzenetemre sem.
Azért beillesztem a kódokat, hátha úgy tudtok segíteni.
 
function SavePlayer(playerid) {
    if(!GetPVarInt(playerid, \"Logged\")) return 1;
new weapons[13][2];
line[0] = EOS;
query[0] = EOS;
for(new i = 0; i < 13; i++) {
    GetPlayerWeaponData(playerid, i, weapons[0], weapons[1]);
format(string, sizeof(string), \"%i \", weapons[0]);
strcat(line, string);
format(string, sizeof(string), \"%i \", weapons[1]);
strcat(query, string);
}
strdel(line, strlen(line)-1, strlen(line));
strdel(query, strlen(query)-1, strlen(query));
new spawnplace[256];
GetPVarString(playerid, \"SpawnPlace_Data\", spawnplace, sizeof(spawnplace));
new IGZ[256];
for(new x; x < 100; x++) strcat(IGZ, (IsIntactGZ[playerid]
  • == true) ? (\" 1\") : (\" 0\"));

format(query, sizeof(query), \"UPDATE `Users` SET Money = \'%i\', XP = \'%i\', Kills = \'%i\', Deaths = \'%i\', NameColor = \'%i\', Time = \'%i\', Weapons = \'%s\', Ammos = \'%s\', Admin = \'%i\', Warns = \'%i\', Mute = \'%i\', SpawnPlace = \'%s\', IGZ = \'%s\' WHERE Name = \'%s\';\",
GetPlayerCash(playerid),
GetPlayerXP(playerid),
GetPVarInt(playerid, \"Kills\"),
GetPVarInt(playerid, \"Deaths\"),
GetPlayerColor(playerid),
GetPlayerServerTime(playerid),
line,
query,
GetPVarInt(playerid, \"Admin\"),
GetPVarInt(playerid, \"Warns\"),
GetPVarInt(playerid, \"MuteTime\"),
spawnplace,
IGZ[1],
pName(playerid)
);
mysql_function_query(sql, query, true, \"THREAD_Finish\", \"\");
return 1;
}
function THREAD_LoadPlayer(playerid) {
SetPVarInt(playerid, \"RegID\", cache_get_row_int(0, 0, sql));
SetPlayerCash(playerid, cache_get_row_int(0, 7, sql));
SetPlayerXP(playerid, cache_get_row_int(0, 8, sql));
SetPVarInt(playerid, \"Kills\", cache_get_row_int(0, 9, sql));
SetPVarInt(playerid, \"Deaths\", cache_get_row_int(0, 10, sql));
SetPVarInt(playerid, \"loadTime\", cache_get_row_int(0, 11, sql));
SetPVarInt(playerid, \"loadgettime\", gettime());
CheckPlayerHours(playerid, 1);
SetPVarInt(playerid, \"nos\", cache_get_row_int(0, 19, sql));
new warns = cache_get_row_int(0, 20, sql);
SetPVarInt(playerid, \"Warns\", warns);
if(warns) {
format(string, sizeof(string), \"Jelenleg {FF0000}%i {FFBB00}darab figyelmeztetéssel rendelkezel!\", warns);
SendClientMessage(playerid, 0xFFBB00FF, string);
}
new mute = cache_get_row_int(0, 21, sql);
if(mute) {
SetPVarInt(playerid, \"MuteTime\", mute);
new minutes = mute / 60;
format(string, sizeof(string), \"Le vagy némítva. Némításodból még %i perc, és %i mp van hátra!\", minutes, mute - (minutes*60));
SendClientMessage(playerid, 0xFF0000FF, string);
}
new weaps[14], amms[14];
cache_get_row(0, 16, string, sql, sizeof(string));
sscanf(string, \"a<i>[14]\", weaps);
cache_get_row(0, 17, string, sql, sizeof(string));
sscanf(string, \"a<i>[14]\", amms);
for(new x; x < 14; x++) {
    format(line, sizeof(line), \"w_%i\", x);
SetPVarInt(playerid, line, weaps
  • );

    format(line, sizeof(line), \"a_%i\", x);
SetPVarInt(playerid, line, amms
  • );

}
new adminlvl = cache_get_row_int(0, 18, sql);
if(adminlvl) {
    new rang[32];
switch(adminlvl) {
   case 1: rang = \"Próbaidős admin\";
   case 2: rang = \"Moderátor\";
   case 3: rang = \"Adminisztrátor\";
   case 4: rang = \"Teljes Adminisztrátor\";
   case 5: rang = \"Tulajdonos\";
}
    SetPVarInt(playerid, \"adminlabel\", _:CreateDynamic3DTextLabel(rang, -1, 0.0, 0.0, -1.0, 20.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 50.0));
SetPVarInt(playerid, \"Admin\", adminlvl);
}
new SpawnPlaceDatas[300];
cache_get_row(0, 23, SpawnPlaceDatas, sql, sizeof(SpawnPlaceDatas));
SetPVarString(playerid, \"SpawnPlace_Data\", SpawnPlaceDatas);
new IGZ[256];
cache_get_row(0, 24, IGZ, sql, sizeof(IGZ));
sscanf(IGZ, \"a<i>[100]\", IsIntactGZ[playerid]);
AddScreenText(playerid, \"~y~Adataid betöltve!\", 4000);
return 1;
}

 
A(z) `users` mentési sql.
 
CREATE TABLE IF NOT EXISTS `Users` (
  `ID` mediumint(10) unsigned NOT NULL AUTO_INCREMENT,
  `Name` varchar(24) NOT NULL,
  `Password` varchar(256) NOT NULL,
  `RegDate` mediumint(11) NOT NULL,
  `LastLogged` mediumint(11) NOT NULL,
  `LastIP` varchar(20) NOT NULL,
  `Autologin` int(1) NOT NULL,
  `Money` int(9) NOT NULL,
  `XP` int(9) NOT NULL,
  `Kills` int(9) NOT NULL,
  `Deaths` int(9) NOT NULL,
  `Time` int(9) NOT NULL,
  `NameColor` int(10) NOT NULL,
  `FavSkin` int(3) NOT NULL,
  `Goto` int(1) NOT NULL,
  `PM` int(1) NOT NULL,
  `Weapons` varchar(256) NOT NULL,
  `Ammos` varchar(64) NOT NULL,
  `Admin` int(1) NOT NULL,
  `Nos` int(1) NOT NULL DEFAULT \'0\',
  `Warns` int(1) NOT NULL DEFAULT \'0\',
  `Mute` int(5) NOT NULL DEFAULT \'0\',
  `Banned` varchar(256) NOT NULL DEFAULT \'0\',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=24 ;

 
Szerintetek hol, vagy miben van a hiba?
Aki tud segíteni, annak nagyon szépen köszönöm! :)
« Utoljára szerkesztve: 2015. Július 22. - 23:50:59 írta Flash »

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
ProLine FreeRoam mód, mentési-betöltési hiba.
« Válasz #1 Dátum: 2015. Július 22. - 23:34:45 »
0 Show voters
mysql-hez csatlakozik egyáltalán?

ᗩωєѕσмє

  • Vendég
ProLine FreeRoam mód, mentési-betöltési hiba.
« Válasz #2 Dátum: 2015. Július 22. - 23:39:20 »
+1 Show voters
Igen. Beállítottam minden adatot. Viszont ha kívülről állítom be mysql-en keresztül mondjuk a pénzt, akkor a játékba is ugyan annyi van. De ha a játékban kapok még pénzt, nem frissíti a pénzem az sql-ben, tehát ugyan annyi marad, amennyit beírtam :O

Nem elérhető Flash

  • 5726
  • (っ◕‿◕)っ
    • Profil megtekintése
ProLine FreeRoam mód, mentési-betöltési hiba.
« Válasz #3 Dátum: 2015. Július 24. - 15:04:39 »
+1 Show voters
Mysql log?

ᗩωєѕσмє

  • Vendég
ProLine FreeRoam mód, mentési-betöltési hiba.
« Válasz #4 Dátum: 2015. Július 24. - 16:50:41 »
+1 Show voters
Time   Function   Status   Message
16:41:13   CMySQLQuery::Execute[THREAD_LoadButorok]   ERROR   (error #1146) Table \'prooline.butorok\' doesn\'t exist
16:41:50   CMySQLQuery::Execute[THREAD_Finish]   ERROR   (error #1136) Column count doesn\'t match value count at row 1
16:42:24   CMySQLQuery::Execute[THREAD_Finish]   ERROR   (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 1
16:42:52   CMySQLQuery::Execute[THREAD_Finish]   ERROR   (error #1136) Column count doesn\'t match value count at row 1
In callback \"THREAD_LoadPlayer\"
16:42:52   CMySQLResult::GetRowData   WARNING   invalid row (\'0\') or field index (\'23\')
16:42:52   CMySQLResult::GetRowData   WARNING   invalid row (\'0\') or field index (\'24\')
16:43:12   CMySQLQuery::Execute[THREAD_Finish]   ERROR   (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 1
« Utoljára szerkesztve: 2015. Július 24. - 17:32:04 írta Flash »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal