Mysl problem
#1

Hi. When I using this code its works great:
Code:
                Player.exp[pid]+=100;
                mysql_function_query(DbHandle, f("UPDATE players SET exp = (exp+'100') WHERE Name = '%s'",GetPlayerNameEx(pid)), true, "SendQuery", "");
I wana that code would add not 100 xp, but random. So i have this code, but it doesn't work..

HTML Code:
      new eexp = RandomEx(90,300);
                Player.exp[pid]+=eexp;
                mysql_function_query(DbHandle, f("UPDATE players SET exp = (exp+'eexp') WHERE Name = '%s'",GetPlayerNameEx(pid)), true, "SendQuery", "");
Why? : /
Reply
#2

Your "f" function looks suspicious. Can you show us what it does?
Reply
#3

Use this
Quote:
new eexp = RandomEx(90,300);

Player.exp[pid]+=eexp;

mysql_function_query(DbHandle, f("UPDATE players SET exp = (exp+%d) WHERE Name = '%s'", eexp, GetPlayerNameEx(pid)), true, "SendQuery", "");

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)