Jump to content

No one Solve this little problem ?


Recommended Posts

Posted (edited)

Hello Guys

look to this 

?

 
  1. ~~server~~
  2. function getinfo()
  3.  
  4. local result = mysql_query(handler, "SELECT * FROM account WHERE mtaserial='"..getPlayerSerial(source).."'")
  5. numRows = mysql_num_rows ( result )
  6. if numRows == 1 then
  7. if (result) then
  8. while true do
  9. local data = mysql_fetch_assoc(result)
  10. if (not data) then break end
  11. name= tostring(data["accountname"])
  12.  
  13. triggerClientEvent(source, "selectt", getRootElement(), name)
  14. end
  15. mysql_free_result(result)
  16. else
  17. end
  18. end
  19. end
  20.  
  21.  
  22. ~~client~~
  23. function show (name)
  24. if ( ( source == playerstable ) ) then
  25. if ( guiGridListGetSelectedItem( playerstable ) ~= -1 ) then
  26. guiSetText ( accountnamelabel, "AccountName : "..name.."" )
  27. end
  28. end
  29. end
  30. addEvent("selectt",true)
  31. addEventHandler("selectt",getRootElement(),show)

The problem is When im pressing on Playername instead of accountname its showing Word "left" this Screenshot

 

2hmli6d.png

Can someone Solve this ??

Edited by Aboodealtikrity

I Would like To learn the Scripting But?

no one Helping in this world ¬¬

Posted

No need to create the same topic over and over again. If somebody knows a solution, they'll try to help you.

  • Like 2

G6HYac9.jpg

I love rock/metal/pop but don't mind any other music genre except чалга...that thing sux 
I also love cars

PS I'm friendly

Posted
6 hours ago, koragg said:

No need to create the same topic over and over again. If somebody knows a solution, they'll try to help you.

Ok im sorry Mr but the problem is small and should i wait for a weeks this forum for support i think ..

But no problem this is second topic in english section and i asked in my main languages maybe no one understood me in english section i said i know its my mistake but not a big problem

 

I Would like To learn the Scripting But?

no one Helping in this world ¬¬

Posted

You have to keep in mind providing help on these forums is something we do on our spare time - for free. You make the thread and patiently wait like everyone else, you're not entitled to us helping you.

Either way, the problem is with name= tostring(data["accountname"]) as it is returning "left". Since we can't see how you're populating it, we can't really help you.

Also, the MySQL module is obsolete. MTA now has native support for MySQL, you might want to use those functions instead.

  • Like 1

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...