Author Topic: Core.SetUserValue, is it possible?  (Read 1674 times)

0 Members and 1 Guest are viewing this topic.

Offline Enuri

  • Newbie
  • *
  • Posts: 9
  • Karma: +1/-0
Core.SetUserValue, is it possible?
« on: 07 December, 2009, 17:13:36 »
Hello.

Is is possible to add function for modify user data to lua api?

I tried write my own Core.SetUserValue function based on Core.GetUserValue. I changed switch(ui8DataId), for example, at case 2:
I use memcpy to copy a "test" string to u->Description.
Then i call a my function from script, and view a result using Core.GetUser(nick,true);
But only sMyInfoString and sTag have changed (sDescription haven't changed).
And i believe data changed only in lua table, because hub sends old $MyInfo string to new connecting users.

Help me write a correct function, please :)
I need only a correct code to modify data in "real" user table, not only lua table. I want to use my SetUserValue in UserConnected to add some description tags.

Regards, Denis.

PtokaX forum

Core.SetUserValue, is it possible?
« on: 07 December, 2009, 17:13:36 »