tdoa
New Member
Posts: 5
inherit
258685
0
Oct 4, 2019 3:53:06 GMT -8
tdoa
5
June 2019
tdoa
|
Post by tdoa on Oct 2, 2019 14:32:07 GMT -8
I want to write a simple code that will store a different number for all members.
I already have Yootil installed; so I can get the user's id as a value. (Admin's is 1, the next member to register is 2, etc). That's no problem.
I am simply looking for a way to create a key, and access its value depending on the user id.
I am led to believe that the code would look something like this?
var user_id; //this string I'll get it from yootil, no problem here
pb.data(user_id, "123"); //this should in theory create an unique key, and assign the value 123 var lets_read_the_key = pb.data(user_id); //this should return the logged user's value, or 123 alert(lets_read_the_key); //and this will alert the user his/her personal value, or 123 Am I missing something?
|
|
inherit
223590
0
May 17, 2023 9:13:21 GMT -8
Kitty Katt
My Username is @kittykatt (with 2 t's in katt)
819
July 2015
kittykatt
|
Post by Kitty Katt on Oct 2, 2019 22:34:57 GMT -8
I want to write a simple code that will store a different number for all members. I already have Yootil installed; so I can get the user's id as a value. (Admin's is 1, the next member to register is 2, etc). That's no problem. I am simply looking for a way to create a key, and access its value depending on the user id. I am led to believe that the code would look something like this? var user_id; //this string I'll get it from yootil, no problem here
pb.data(user_id, "123"); //this should in theory create an unique key, and assign the value 123 var lets_read_the_key = pb.data(user_id); //this should return the logged user's value, or 123 alert(lets_read_the_key); //and this will alert the user his/her personal value, or 123 Am I missing something? Hello. Peter made an ebook that covers how to make plugins - including how to use keys. You can find the PDF download link in this post here.
|
|
tdoa
New Member
Posts: 5
inherit
258685
0
Oct 4, 2019 3:53:06 GMT -8
tdoa
5
June 2019
tdoa
|
Post by tdoa on Oct 3, 2019 3:42:38 GMT -8
Thanks!
|
|