Home / Topic / Memory game not working

Memory game not working

Home Kwiksher Forums Kwik4 Memory game not working

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • aaaiii
    Participant
    #85796

    Hi

    Been working on a memory game and followed the tutorial (both video and on kwiksher home page).
    When publishing I can see the page and the covers, but when i try to press any of the covers, i get an error:

    12:39:12.278 ERROR: Runtime error
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\components\page01\page_ext_lib_code_.lua:42: attempt to index global ‘composer’ (a nil value)
    12:39:12.278 stack traceback:
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\components\page01\page_ext_lib_code_.lua:42: in function ‘hitTest’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\commands\page01\ext_but_33_code_068.lua:18: in function ‘execute’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\extlib\robotlegs\Context.lua:40: in function ‘onHandleEvent’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\extlib\robotlegs\Context.lua:45: in function ‘?’
    12:39:12.278 ?: in function ‘dispatchEvent’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\mediators\page01Mediator.lua:171: in function ‘?’
    12:39:12.278 ?: in function ‘dispatchEvent’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\commands\page01\photo33_button_but_33.lua:21: in function ‘execute’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\extlib\robotlegs\Context.lua:40: in function ‘onHandleEvent’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\extlib\robotlegs\Context.lua:45: in function ‘?’
    12:39:12.278 ?: in function ‘dispatchEvent’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\mediators\page01Mediator.lua:174: in function ‘?’
    12:39:12.278 ?: in function ‘dispatchEvent’
    12:39:12.278 C:\Users\kimfi\Documents\Kwik\memoEK\build4\components\kwik\tabButFunction.lua:16: in function ‘?’
    12:39:12.278 ?: in function <?:190>
    12:39:12.278 — unhandledError —
    12:39:12.278 table: 0D110898

    Been trying to figure out this for the last 2 days but I dont understand whats wrong?
    Any idea on what could be the issue here?

    aaaiii
    Participant
    #85797

    Update:
    Noticed something today when I was trying to do a little more research on the error message I was recieving when simulating the memory game I’ve created.

    I tried to backtrace all my steps and thought that I was going to start all over again to see if there was something I had missed. So I started from scratch and opened a downloaded fresh unzipped memory game file from the tutorial page. But in Photoshop, when i tried to open the allready composed memory game that followed the tutorial posted, I got a message in Kwik, saying i had to -update the template in project properties-. First time I saw the message, I didnt pay to much attention to it since I was doing the whole thing from scratch. But this time I did the update on the template in project properties, and when launching the memory game, I realized that the functions on the downloaded memory game file, didnt work either. It ended up in the same error messages in Corona. Could it be that some of the .lua files is outdated because of a lately update in Corona or something???

    Yamamoto
    Keymaster
    #85798

    I tested the tutorial sample of Memory game. Are you using this one?

    https://kwiksher.com/doc/kwik_tutorial/programming/memory_game/

    I could not reproduce the error you encountered. I have uploaded the memory game sample of Ultimate config prject (320×480 @4x system) to the server.

    https://kwiksher.com/tutorials/Kwik4/MemoryUC.zip

    I have not clearing up the old tutorials or the videos of Kwik3, so I am afraid you are using the old ones.

    aaaiii
    Participant
    #85799

    Hi

    Fantastic! Got it all working 🙂

    I was using a tutorial from 2015. This one: https://kwiksher.com/tutorials_kwik/creating-a-memory-game/
    Noticed that there was some differencies in the .lua text coding on the new one. Guess the problem was that the program could not understand what I was trying to do with the old .lua file 🙂
    Thanks for helping me out!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.