31.07.2013, 11:22
Hello. I have error with mysql loading.
Here is the script:
Saving:
Error's:
Line 1593:
Line 1597:
Variables:
Mysql version:
Here is the script:
Код:
if(dialogid == 2) { if(response) { new vardas[24], query[256]; GetPlayerName(playerid, vardas, 24); if(IsPlayerConnected(playerid)) { MySQLCheck(); format(query,sizeof(query),"SELECT Pinigai, Score, posx, posy, posz, posa FROM `"TABLENAME"` WHERE Vardas = '%s' AND Slaptazodis = ('%s') LIMIT 1",vardas,inputtext); mysql_query(query); mysql_store_result(); if(mysql_num_rows() != 0) { new result[50],result1[50]; mysql_get_field("Money",result); strval(result) = PlayerMoney[playerid]; GivePlayerMoney(playerid,PlayerMoney[playerid]); mysql_get_field("Score",result1); strval(result1) = PlayerScore[playerid]; GivePlayerScore(playerid,PlayerScore[playerid]); SendClientMessage(playerid,SPALVA_ORANDZINE,"Tu sлkmingai prijungtas prie sаskaitos. Sлkmлs юaidime!"); Logged[playerid] = true; mysql_free_result(); } else { mysql_free_result(); ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Prisijungimas","Бveskite savo sаskaitos prisijungimo slaptaюodб:","Tжsti","Iрeiti"); return SendClientMessage(playerid,SPALVA_ORANDZINE,"Sаskaitos vartotojas neatpaюintas, greiиiausiai slaptaюodis neatitiko."); } } else { mysql_store_result(); mysql_free_result(); } } else if(!response) { Kick(playerid); return 1; } return 1; }
Код:
public OnPlayerDisconnect(playerid, reason) { new query[300],pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName)); if (Logged[playerid]) { MySQLCheck(); format(query,sizeof(query),"UPDATE `"TABLENAME"` SET `Money`='%d',`Score`='%d' WHERE (`Vardas` = '%s')",GetPlayerMoney(playerid),GetPlayerScore(playerid),pName); mysql_query(query); }
Код:
C:\Users\seima\Desktop\gm seip\gamemodes\seip.pwn(1593) : error 022: must be lvalue (non-constant) C:\Users\seima\Desktop\gm seip\gamemodes\seip.pwn(1593) : warning 215: expression has no effect C:\Users\seima\Desktop\gm seip\gamemodes\seip.pwn(1597) : error 022: must be lvalue (non-constant) C:\Users\seima\Desktop\gm seip\gamemodes\seip.pwn(1597) : warning 215: expression has no effect
Код:
strval(result) = PlayerMoney[playerid];
Код:
strval(result1) = PlayerScore[playerid];
Код:
new PlayerMoney[MAX_PLAYERS]; new PlayerScore[MAX_PLAYERS];
Код:
new result[50],result1[50]; new vardas[24], query[256];
Код:
BlueG r6