Home / Topic / Seting miltilanguage layer to hide

Seting miltilanguage layer to hide

Home Kwiksher Forums Help me! Seting miltilanguage layer to hide

Viewing 1 post (of 1 total)
  • Anonymous

    I am not sure if this is a bug or it just works that way.So i have a two text layers each one representing diferent language.the problem is i want these layers to show and to hide with actions (just changing alpha setting for text layer variable)but it gives me an error "atemt to index local  FirstW (a nil value)"after inspecting lua file i found out that the text layer to which i assign language after the first layer was set (i mean when i assign it to the first layer language group) is not even described as normal layer variable.example : -- Table(s) for language(s)       local tSearch       local taben = {}       local tablt = {}       if (lang=="en") then            tSearch = taben        elseif (lang=="lt") then            tSearch = tablt        end       local Words1        local FirstW-- Words1 positioning       taben["words1"] = {349, 1747, "  artą, girios pakrašty, po senom eglėm buvo sukrypęs namelis,no tame namelyje gyveno gerasis katinas Alvinas ir jo mielanšeimyna - du drąsuoliai sūneliai, dvi linksmuolės dukrelėsnir jų mama. Susiruošė vieną dieną Alvinas į mišką grybauti. nIšlydėjo vaikučiai tėvelį ir ėmė laukti parnešant skanėstų.", 24, 23, 5, 100, "Tahoma", 0, 60, 7, 7, 7}       local Words1_txt = tSearch["words1"][3]        local Words1 = display.newText( Words1_txt, tSearch["words1"][4], tSearch["words1"][5], (tSearch["words1"][2]+tSearch["words1"][6]), (tSearch["words1"][1]+tSearch["words1"][7]), tSearch["words1"][8], tSearch["words1"][10])       Words1:setTextColor(tSearch["words1"][11], tSearch["words1"][12], tSearch["words1"][13])       Words1:setReferencePoint (display.TopCenterReferencePoint)       Words1.oriX = Words1.x; Words1.oriY = Words1.y       -- FirstW positioning       tablt["words1"] = {79, 58, "Kn ", 21, -7, 5, 75, "Impact", 1, 100.000007629395, 0, 0, 0} -- Hiding elements       Words1.alpha = 0;       FirstW.alpha = 0; if i swich the sequence of assigning languges to layers then i will get the error the Words1 is a nilSo what should i do?how to show and hide each language layer with actions?

Viewing 1 post (of 1 total)

The forum ‘Help me!’ is closed to new topics and replies.