Results 1 to 3 of 3

Thread: What's wrong with this code?

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    55

    Exclamation

    If BattleArena < 200 Then
    FrmBattle.ImgMonster.Picture=<C:\windows\desktop\rpg\monsters\ghost.gif>
    End If
    End Sub


    Please help if you can

    Thank you
    Beres

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    How about:
    Code:
    If BattleArena < 200 Then
        FrmBattle.ImgMonster.Picture = LoadPicture("ghost.gif")
    End If
    Don't use absolute path names in your program, try making them relative to App.Path
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'if you did app.path then it would be
    If Right(App.Path,1) <> "/" the App.Path = App.Path & "/"
    LoadPicture(App.Path & "ghost.gif")
    
    'since you don't have app.path you have to use a path
    If BattleArena < 200 Then
        FrmBattle.ImgMonster.Picture = LoadPicture("C:\windows\desktop\rpg\monsters\ghost.gif")
    End If
    [Edited by HeSaidJoe on 09-23-2000 at 05:45 AM]
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

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



Click Here to Expand Forum to Full Width