Get the currentuser and set a local Var

  • Hi to everyone, i'm trying do make the plugin to get the currentuser and then use that information but i have some problems

    the first row works perfecly and in the 5 row i can read correctly the Local Var write as the 2 row for example, but it will not work inside at the for i loop, it give me an error

    As you can see the printf(SG_View) have the correct syntax but will not work.

    if i use the second row and comment out the 4th row, works perfectly.

    What im doing wrong?

  • local SG_UserP = CurrentProfile().Name

    local SG_View = Root().ShowData.UserProfiles[SG_UserP].Views

    this will get the ViewPool of the first userprofile with the same name as the name of the userprofile of the current user.

    (userprofile names are not unique)

    unless this is actually what you want, consider to rather do:

    local SG_View = CurrentProfile().Views

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!