Making my first program, ran into a problem.

Discussion in '3DS - Homebrew Development and Emulators' started by LinkMain111, Sep 20, 2015.

  1. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    upload_2015-9-20_11-28-2.png If anyone can help I will be thankful.
     


  2. mashers

    mashers Stubborn ape

    Member
    3,837
    5,155
    Jun 10, 2015
    Kongo Jungle
    You either haven't defined the variables you are using or haven't included the header in which they are defined. Is this code you copied and pasted from an example? If so then it seems that you haven't copied everything.
     
  3. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    Hey @mashers, I am trying to port some nds homebrew.
     
  4. mashers

    mashers Stubborn ape

    Member
    3,837
    5,155
    Jun 10, 2015
    Kongo Jungle
    Ok, so it seems that you are either copying individual source files so some necessary headers are missing, or copying and pasting bits of code meaning that the declarations for the methods or variables mentioned in the errors are missing. You need to look at the errors and see what it is telling you is missing (I.e. which variable or method is it telling you has not been declared), then find out where those things are defined in the original source code and ensure it is included in the same way in your port. Also ensure that any libraries which are used in the original version are included and linked in your port otherwise you will be missing some needed declarations of methods and variables.
     
  5. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    I think I will just remake Space Invaders. There is a problem with my lua interpreter. When I try to display an image i get this screen: upload_2015-9-20_11-48-20.png
    And on the 3ds even when I press the Y or A button it doesn't do anything. However the B button does allow me to exit.
     
  6. mashers

    mashers Stubborn ape

    Member
    3,837
    5,155
    Jun 10, 2015
    Kongo Jungle
    It's impossible to help you with any of these problems without a lot more information on what you are actually trying to do and how you are doing it.
     
  7. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    I have given up on porting the NDS Homebrew. I would like to display an image using the lua interpreter. Here is my code upload_2015-9-20_11-56-36.png

    However I get this error on Citra and on my 3DS. upload_2015-9-20_12-0-41.png
    None of the displayed options work other than exit.
     
  8. Tjessx

    Tjessx GBAtemp Maniac

    Member
    1,157
    508
    Dec 3, 2014
    Belgium
    A restarts the homebrew which will result in the same error, this goes so quick that you dont see any different, but it did happen.
    Y tries to start an ftp server which fails due to a bug in ironhax and tubehax
     
  9. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    So is there anyway I can actually make it work.
     
  10. Tjessx

    Tjessx GBAtemp Maniac

    Member
    1,157
    508
    Dec 3, 2014
    Belgium
    The ftp? Only with the older exploits.
    But your there is just an error in your script. I think you forgot to reupload t to be honest
     
  11. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    An error, can you please point out where that is. Also you think I forgot to reupload, please explain what you mean by that.
     
  12. ddraco

    ddraco GBAtemp Regular

    Member
    104
    27
    Sep 12, 2015
    Gambia, The
    Rayono City
    You have the variable for the picture leading in the wrong folder. it tries to go to SD:/file.bmp and not to SD:/3ds/example/file.bmp

    replace Line 4 with
    Code:
    bitmap2 = Screen.loadImage(System.currentDirectory().."/file.bmp")
    then it should load the picture
     
  13. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    I tried what you said and I got this. upload_2015-9-20_12-25-58.png
    Thanks for the help though.
     
  14. ddraco

    ddraco GBAtemp Regular

    Member
    104
    27
    Sep 12, 2015
    Gambia, The
    Rayono City
    i thinl you forgotten to upload the picture what citra/the 3ds shows
     
  15. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    It continues to show this[​IMG]
     
  16. piratesephiroth

    piratesephiroth I wish I could read

    Member
    3,007
    1,619
    Sep 5, 2013
    Brazil
    can it even load bmps? Shouldn't you be using pngs?

    And doesn't Citra have a folder to use as SD card?
     
    Last edited by piratesephiroth, Sep 20, 2015
    LinkMain111 likes this.
  17. LinkMain111
    OP

    LinkMain111 GBAtemp Regular

    Member
    125
    54
    Jul 21, 2015
    Did what you said and now it comes up with this upload_2015-9-20_12-42-40.png

    Paging @Rinnegatamante
     
  18. BurningDesire

    BurningDesire GBAtemp Psycho!

    Member
    4,962
    5,811
    Jan 27, 2015
    United States
    Behind a screen reading news
    I got images to show doing this. I I hope it helps!


    [​IMG]

    — Posts automatically merged - Please don't double post! —

    .png's will also work
     
  19. Rinnegatamante

    Rinnegatamante GBAtemp Psycho!

    Member
    3,127
    3,270
    Nov 24, 2014
    Italy
    Bologna
    When you get this error, it means lpp-3ds can't find index.lua file to start.
     
  20. 730

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    INDENT YOUR CODE PLS :ohnoes: