Jump to content

Recommended Posts

I get this error in my syserr file:

SYSERR: Mar 4 17:44:34 :: RunState: LUA_ERROR: [string "tombola_metin2roa"]:7: attempt to index global `tombola' (a nil value)
SYSERR: Mar 4 17:44:34 :: WriteRunningStateToSyserr: LUA_ERROR: quest tombola_metin2roa.start click

 

Here is the quest:quest tombola_thoria begin

    state start begin
        function tablica(vnum, pozitie, pozitie2)
            local itemy = {
                            {
                                {71001, 1},
                                {71084, 25},
                                {71085, 25},
                                {25040, 3},
                                {27992, 2},
                                {27993, 2},
                                {27994, 2},
                                {27987, 5},
                                {72002, 1},
                                {71027, 5},
                                {71028, 5},
                                {71029, 5},
                                {71030, 5},
                                {71036, 1},
                                {50008, 15},
                                {70021, 3},
                                {71001, 1},
                            },
                            {
                                {25041, 1},
                                {71084, 25},
                                {71085, 25},
                                {25040, 3},
                                {27992, 2},
                                {27993, 2},
                                {27994, 2},
                                {27987, 5},
                                {72002, 1},
                                {71027, 5},
                                {71028, 5},
                                {71029, 5},
                                {71030, 5},
                                {71036, 1},
                                {50008, 15},
                                {70021, 3},
                                {25041, 1},
                            }
                        }
                return itemy[vnum][pozitie][pozitie2]
            end
              
          
          
        when login begin
            cmdchat("tombola "..q.getcurrentquestindex())
        end
      
        when 9005.chat."Deschide Tombola" with pc.is_gm() begin
            local vegas = number(1,2)
            local str = " "
local tombola = 0
            for q = 1,16 do
                if q == 16 then
                    str = str..tombola.tablica(vegas, q, 1).."|"..tombola.tablica(vegas, q, 2)
                else
                    str = str..tombola.tablica(vegas, q, 1).."|"..tombola.tablica(vegas, q, 2).."|"
                end
            end
            cmdchat("OnPrepare"..str)
            cmdchat("openTombola")
            setskin(NOWINDOW)
        end
      
        when info or button begin
            local vegas = number(1,2)
            local str = " "
local tombola = 0
            for q = 1,16 do
                if q == 16 then
                    str = str..tombola.tablica(vegas, q, 1).."|"..tombola.tablica(vegas, q, 2)
                else
                    str = str..tombola.tablica(vegas, q, 1).."|"..tombola.tablica(vegas, q, 2).."|"
                end
            end
            cmdchat("OnPrepare"..str)
            if pc.count_item(30319) < 1 then
                syschat("Nu puteti juca, pentru că nu aveti suficient spatiu în inventar.")
                return
else
                pc.remove_item(30319, 1)
            end
            cmdchat("get_input_start")
            local intrare = input(cmdchat("get_input_value"))
            cmdchat("get_input_end")
            if intrare == "tombola|begin" then
                pc.setqf("slot", number(1, 16))
                cmdchat("OnRun "..number(2,3)*16+pc.getqf("slot").."|5")
            elseif intrare == "tombola|end" then
                cmdchat("buff_vegas") --- o sa va caut sa va pun un effect si va fac un tut de implementare
                syschat("Felicitări! Ai primit "..tombola.tablica(vegas, pc.getqf("slot")+1, 2).."x "..item_name(tombola.tablica(vegas, pc.getqf("slot")+1, 1)).." ca o recompensă în Tombola!")
                pc.give_item2(tombola.tablica(vegas, pc.getqf("slot")+1, 1), tombola.tablica(vegas, pc.getqf("slot")+1, 2))
            end
        end
    end
end

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.