Results 1 to 8 of 8

Thread: Coding Problem + other question(s)

  
  1. #1
    monster356 is offline -Hacks Newbie
    Join Date
    Jun 2005
    Location
    VT
    Posts
    39
    Rep Power
    15

    Default

    Well, i have been working on my game, and i wanted my music in my menu, but there is one prob i get an error, i messed with the coding a bit, and it still messes up
    this is the error:

    lua players mikmod has a critical
    _mm_critical 0
    _mm_erno 1
    cannot open requested file


    here is my coding:

    System.usbDiskModeActivate()

    blue = Color.new(0, 0, 255)
    orange = Color.new(223, 88, 6)
    red = Color.new(255, 0, 0)
    grey = Color.new(94, 97, 111)
    yellow = Color.new(255, 255, 0)
    bloodred = Color.new(145, 0, 0)
    black = Color.new(0, 0, 0)

    intro = Image.load("load.png")
    bar = Image.load("0.png")
    bar20 = Image.load("20.png")
    bar40 = Image.load("40.png")
    bar60 = Image.load("60.png")
    bar80 = Image.load("80.png")
    bar100 = Image.load("100.png")

    screen:blit(0, 0, intro, false)
    screen:blit(194, 118, bar, false)
    screen:print(194, 136, "Loading: 0%", yellow)
    screen:print(178, 145, "Loading Graphics", red)
    screen.flip()
    screen.waitVblankStart(90 )
    screen:clear()

    screen:blit(0, 0, intro, false)
    screen:blit(194, 118, bar20, false)
    screen:print(194, 136, "Loading: 20%", yellow)
    screen:print(178, 145, "Loading Graphics", red)
    screen:flip()
    screen.waitVblankStart(90 )
    screen:clear()

    screen:blit(0, 0, intro, false)
    screen:blit(194, 118, bar40, false)
    screen:print(194, 136, "Loading: 40%", yellow)
    screen:print(180, 145, "Loading Sprites", red)
    screen:flip()
    screen.waitVblankStart(90 )
    screen:clear()

    screen:blit(0, 0, intro, false)
    screen:blit(194, 118, bar60, false)
    screen:print(194, 136, "Loading: 60%", yellow)
    screen:print(180, 145, "Loading Sprites", red)
    screen:flip()
    screen.waitVblankStart(90 )
    screen:clear()

    [code]screen:blit(0, 0, intro, false)
    screen:blit(194, 118, bar80, false)
    screen:print(194, 136, "Loading: 80%", yellow)
    screen:print(186, 145, "Loading Sounds", red)
    screen:flip()
    screen.waitVblankStart(110 )
    screen:clear()

    screen:blit(0, 0, intro, false)
    screen:blit(194, 118, bar100, false)
    screen:print(194, 136, "Loading: 100%", yellow)
    screen:print(197, 145, "Loading Menu", red)
    screen:flip()
    screen.waitVblankStart(110 )
    screen:clear()

    menubg = Image.load("menubg.png")
    start = Image.load("start.png")
    control = Image.load("controls.png")
    logo = Image.load("logo.png")
    boltsnd = Sound.load("strangehold.xm")

    while true do
    screen:blit(0, 0, menubg, false)
    screen:blit(90, 10, logo, false)
    screen:blit(130, 136, start, false)
    screen:blit(130, 210, control, false)
    screen:print(110, 261, "Press 'Select' for a screenshot", blue)
    boltsnd:play()
    screen:flip()

    pad = Controls.read()

    if pad:start() then
    break
    end
    end

    how do i fix it?

    here is question number 2

    how do i make buttons work, like in a menu?


  2. #2
    LordCthulu is offline Senior Member -Hacks Enthusiast
    Join Date
    Mar 2005
    Posts
    578
    Rep Power
    15

    Default

    That code looks very familiar...
    It looks like
    Code:
    boltsnd = Sound.load("strangehold.xm")
    Is your only music? I can't remember the exact reason for that stupid mikmod critical error, but make sure the music file is in the right spot, it's the right...idunno...im not a sound guy buy I believe mono, and between a certain Hz band and some shit like that hahha.
    Oldest psp-hacks member ever.

  3. #3
    monster356 is offline -Hacks Newbie
    Join Date
    Jun 2005
    Location
    VT
    Posts
    39
    Rep Power
    15

    Default

    That code looks very familiar...
    It looks like
    Code:
    boltsnd = Sound.load("strangehold.xm")
    Is your only music? I can't remember the exact reason for that stupid mikmod critical error, but make sure the music file is in the right spot, it's the right...idunno...im not a sound guy buy I believe mono, and between a certain Hz band and some shit like that hahha.
    umm...what?

  4. #4
    LordCthulu is offline Senior Member -Hacks Enthusiast
    Join Date
    Mar 2005
    Posts
    578
    Rep Power
    15

    Default

    I said it looks like that sound file is the only one your using.
    There's certain properties that the sound files you use need.

    the wavs i used successfully were mono-22050Hz 16-bit little endian pcm.
    Theres an example for wav's. And if your confused, don't worry so am I :lol:
    Oldest psp-hacks member ever.

  5. #5
    monster356 is offline -Hacks Newbie
    Join Date
    Jun 2005
    Location
    VT
    Posts
    39
    Rep Power
    15

    Default

    I said it looks like that sound file is the only one your using.
    There's certain properties that the sound files you use need.

    the wavs i used successfully were mono-22050Hz 16-bit little endian pcm.
    Theres an example for wav's. And if your confused, don't worry so am I :lol:
    how would i change my music file to those properties

  6. #6
    LordCthulu is offline Senior Member -Hacks Enthusiast
    Join Date
    Mar 2005
    Posts
    578
    Rep Power
    15

    Default

    -Not- a clue :)

    Im not saying thats the problem or anything, and your using a .xm not a wav so thouse settings are different than what you would need for a .xm I would think, but I don't know. You'll have to wait till someone posts who knows what they are talkin about haha ;P
    Oldest psp-hacks member ever.

  7. #7
    monster356 is offline -Hacks Newbie
    Join Date
    Jun 2005
    Location
    VT
    Posts
    39
    Rep Power
    15

    Default

    -Not- a clue :)

    Im not saying thats the problem or anything, and your using a .xm not a wav so thouse settings are different than what you would need for a .xm I would think, but I don't know. You'll have to wait till someone posts who knows what they are talkin about haha ;P
    thanx for your help!

  8. #8
    LordCthulu is offline Senior Member -Hacks Enthusiast
    Join Date
    Mar 2005
    Posts
    578
    Rep Power
    15

    Default

    Haha, didn't really help much =X But NP mang, I got ya back :razz:
    Oldest psp-hacks member ever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •