Results 1 to 6 of 6

Thread: [HELP] get error when trying run the script

  
  1. #1
    GreenAndi is offline -Hacks Newbie
    Join Date
    Dec 2005
    Location
    Western Australia
    Posts
    11
    Rep Power
    0

    Default

    hai everyone

    im new in LUA
    i have problem when try my program

    on Command Prompt windows

    D:\LuaPlayer>luaplayer d:/try/testscript.lua [enter]
    error: d:/try/testscript.lua:11: Image.Load: Error Loading image

    what does "11" mean ?
    does it the line number ?
    the 11th line on my code is

    cross = Image.load("D:\try\cross.png")

    if i delele them, it becomes "12"
    the 12th line on my code is

    circle = Image.load("D:\try\circle.png")

    is my control code wrong ? or the image ? or the folder ?

    thx's


  2. #2
    mafia1ft is offline -Hacks Newbie
    Join Date
    Mar 2006
    Posts
    9
    Rep Power
    0

    Default

    what folder is the script in and what folder is the pic
    and then i'll tell you what to type

  3. #3
    GreenAndi is offline -Hacks Newbie
    Join Date
    Dec 2005
    Location
    Western Australia
    Posts
    11
    Rep Power
    0

    Default

    the script and the pictures in folder d:\try

    thanks's mafia1ft

  4. #4
    mafia1ft is offline -Hacks Newbie
    Join Date
    Mar 2006
    Posts
    9
    Rep Power
    0

    Default

    then just try this
    cross = Image.load("cross.png")

    tell me if this works

  5. #5
    GreenAndi is offline -Hacks Newbie
    Join Date
    Dec 2005
    Location
    Western Australia
    Posts
    11
    Rep Power
    0

    Default

    it does not work
    still in line 11th
    cross = image.load{"cross.png")

  6. #6
    mafia1ft is offline -Hacks Newbie
    Join Date
    Mar 2006
    Posts
    9
    Rep Power
    0

    Default

    try a saving the pic as a .jpg


    this is the code i use for my program

    -- PSPRSP v0.1
    -- MADE BY MAFIA1FT


    splash = Image.load("PICS/BG1.JPG")

    green = Color.new(0,255,0)

    while true do
    screen:clear()

    pad = Controls.read()

    screen:blit(0, 0, splash, 0, 0, splash:width(), splash:height(), false)

    if pad:square() then
    dofile("SQUARE.lua")
    end

    if pad:cross() then
    dofile("CROSS.lua")
    end

    if pad:circle() then
    dofile("CIRCLE.lua")
    end

    screen.waitVblankStart()
    screen.flip()
    end

Posting Permissions

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