Jump to content

Problem with GUI


justn

Recommended Posts

Debugscript Errors:

WARNING: Phone/phone_c.lua:20 Bad argument @ 'guiGetVisible' [Expected gui-element at argument 1, got boolean]

WARNING: Phone/phone_c.lua:24 Bad argument @ 'guiSetVisible' [Expected gui-element at argument 1, got boolean]

        Phone_Image = guiCreateStaticImage(438, 112, 233, 398, ":guieditor/images/phone_s4.png", false) 
         
        Anims = guiCreateStaticImage(21, 78, 44, 54, ":guieditor/images/apps/animations.png", false, Phone_Image) 
        Banking = guiCreateStaticImage(22, 155, 43, 47, ":guieditor/images/apps/givecash.png", false, Phone_Image) 
        Car_Mods = guiCreateStaticImage(96, 78, 42, 54, ":guieditor/images/apps/carmods.png", false, Phone_Image) 
        Phone_Label = guiCreateLabel(75, 37, 86, 15, "*CIR* - Phone", false, Phone_Image) 
        guiSetFont(Phone_Label, "default-bold-small") 
        Map = guiCreateStaticImage(94, 155, 44, 47, ":guieditor/images/apps/map.png", false, Phone_Image) 
        Events = guiCreateStaticImage(21, 228, 44, 50, ":guieditor/images/apps/events.png", false, Phone_Image) 
        Sms = guiCreateStaticImage(94, 226, 42, 52, ":guieditor/images/apps/sms.png", false, Phone_Image) 
        Gps = guiCreateStaticImage(21, 299, 44, 48, ":guieditor/images/apps/gps.png", false, Phone_Image) 
        MW = guiCreateStaticImage(170, 78, 47, 54, ":guieditor/images/apps/mostwanted.png", false, Phone_Image) 
        Music = guiCreateStaticImage(170, 155, 47, 47, ":guieditor/images/apps/music.png", false, Phone_Image) 
        Notes = guiCreateStaticImage(170, 225, 47, 53, ":guieditor/images/apps/notes.png", false, Phone_Image) 
        PhoneCall = guiCreateStaticImage(170, 299, 47, 48, ":guieditor/images/apps/phone.png", false, Phone_Image) 
        Settings = guiCreateStaticImage(94, 299, 42, 48, ":guieditor/images/apps/settings.png", false, Phone_Image) 
  
       bindKey ( "F2" , "down" , 
    function () 
        if guiGetVisible ( Phone_Image , true ) then 
            guiSetVisible ( Phone_Image , false ) 
            showCursor ( false ) 
        else 
            guiSetVisible ( Phone_Image , true ) 
            showCursor ( true ) 
        end 
    end)         

Link to comment
  
       Phone_Image = guiCreateStaticImage(438, 112, 233, 398, ":guieditor/images/phone_s4.png", false) 
        
        Anims = guiCreateStaticImage(21, 78, 44, 54, ":guieditor/images/apps/animations.png", false, Phone_Image) 
        Banking = guiCreateStaticImage(22, 155, 43, 47, ":guieditor/images/apps/givecash.png", false, Phone_Image) 
        Car_Mods = guiCreateStaticImage(96, 78, 42, 54, ":guieditor/images/apps/carmods.png", false, Phone_Image) 
        Phone_Label = guiCreateLabel(75, 37, 86, 15, "*CIR* - Phone", false, Phone_Image) 
        guiSetFont(Phone_Label, "default-bold-small") 
        Map = guiCreateStaticImage(94, 155, 44, 47, ":guieditor/images/apps/map.png", false, Phone_Image) 
        Events = guiCreateStaticImage(21, 228, 44, 50, ":guieditor/images/apps/events.png", false, Phone_Image) 
        Sms = guiCreateStaticImage(94, 226, 42, 52, ":guieditor/images/apps/sms.png", false, Phone_Image) 
        Gps = guiCreateStaticImage(21, 299, 44, 48, ":guieditor/images/apps/gps.png", false, Phone_Image) 
        MW = guiCreateStaticImage(170, 78, 47, 54, ":guieditor/images/apps/mostwanted.png", false, Phone_Image) 
        Music = guiCreateStaticImage(170, 155, 47, 47, ":guieditor/images/apps/music.png", false, Phone_Image) 
        Notes = guiCreateStaticImage(170, 225, 47, 53, ":guieditor/images/apps/notes.png", false, Phone_Image) 
        PhoneCall = guiCreateStaticImage(170, 299, 47, 48, ":guieditor/images/apps/phone.png", false, Phone_Image) 
        Settings = guiCreateStaticImage(94, 299, 42, 48, ":guieditor/images/apps/settings.png", false, Phone_Image) 
  
       bindKey ( "F2" , "down" , 
    function () 
    local guiVis = guiGetVisible(Phone_Image) 
    if guiVis == true then 
            guiSetVisible ( Phone_Image , false ) 
            showCursor ( false ) 
        else 
            guiSetVisible ( Phone_Image , true ) 
            showCursor ( true ) 
        end 
    end)         
  

Link to comment
  
       Phone_Image = guiCreateStaticImage(438, 112, 233, 398, ":guieditor/images/phone_s4.png", false) 
        
        Anims = guiCreateStaticImage(21, 78, 44, 54, ":guieditor/images/apps/animations.png", false, Phone_Image) 
        Banking = guiCreateStaticImage(22, 155, 43, 47, ":guieditor/images/apps/givecash.png", false, Phone_Image) 
        Car_Mods = guiCreateStaticImage(96, 78, 42, 54, ":guieditor/images/apps/carmods.png", false, Phone_Image) 
        Phone_Label = guiCreateLabel(75, 37, 86, 15, "*CIR* - Phone", false, Phone_Image) 
        guiSetFont(Phone_Label, "default-bold-small") 
        Map = guiCreateStaticImage(94, 155, 44, 47, ":guieditor/images/apps/map.png", false, Phone_Image) 
        Events = guiCreateStaticImage(21, 228, 44, 50, ":guieditor/images/apps/events.png", false, Phone_Image) 
        Sms = guiCreateStaticImage(94, 226, 42, 52, ":guieditor/images/apps/sms.png", false, Phone_Image) 
        Gps = guiCreateStaticImage(21, 299, 44, 48, ":guieditor/images/apps/gps.png", false, Phone_Image) 
        MW = guiCreateStaticImage(170, 78, 47, 54, ":guieditor/images/apps/mostwanted.png", false, Phone_Image) 
        Music = guiCreateStaticImage(170, 155, 47, 47, ":guieditor/images/apps/music.png", false, Phone_Image) 
        Notes = guiCreateStaticImage(170, 225, 47, 53, ":guieditor/images/apps/notes.png", false, Phone_Image) 
        PhoneCall = guiCreateStaticImage(170, 299, 47, 48, ":guieditor/images/apps/phone.png", false, Phone_Image) 
        Settings = guiCreateStaticImage(94, 299, 42, 48, ":guieditor/images/apps/settings.png", false, Phone_Image) 
  
       bindKey ( "F2" , "down" , 
    function () 
    if ( guiGetVisible ( Phone_Image ) == true ) then 
        guiSetVisible ( Phone_Image, false ) 
        showCursor(false) 
    elseif ( guiGetVisible ( Phone_Image ) == false ) then 
        guiSetVisible ( Phone_Image, true ) 
        showCursor(true) 
    end 
end 
  
  

Link to comment
You are giving the wrong path for the images and Phone_Image returns false. Modify your paths. Also, why are you specifying true after the gui element here - guiGetVisible(Phone_Image,true). Read the wiki first.

If you read the script you'd understand, and the script was actually working at first, then when i restarted it again , it stopped. anyways the problem was only within the paths.

Edited by Guest
Link to comment
You are giving the wrong path for the images and Phone_Image returns false. Modify your paths.

If you read the script you'd understand, and the script was actually working at first, then when i restarted it again , it stopped. anyways the problem was only within the paths.

.

Really ?

Link to comment
You are giving the wrong path for the images and Phone_Image returns false. Modify your paths.

If you read the script you'd understand, and the script was actually working at first, then when i restarted it again , it stopped. anyways the problem was only within the paths.

.

Really ?

..

Link to comment

Your problem was that

":guieditor/images/phone_s4.png"

you must do new Folder and set any name and put the images and edit the meta

and it works !

and try that

bindKey ( "F2" , "down" , 
    function () 
        if guiGetVisible ( Phone_Image , true ) then 
            guiSetVisible ( Phone_Image , false ) 
            showCursor ( false ) 
        else 
            guiSetVisible ( Phone_Image , true ) 
            showCursor ( true ) 
        end 
    end 
)      

Link to comment

Your problem was that

":guieditor/images/phone_s4.png"

you must do new Folder and set any name and put the images and edit the meta

and it works !

and try that

bindKey ( "F2" , "down" , 
    function () 
        if guiGetVisible ( Phone_Image , true ) then 
            guiSetVisible ( Phone_Image , false ) 
            showCursor ( false ) 
        else 
            guiSetVisible ( Phone_Image , true ) 
            showCursor ( true ) 
        end 
    end 
)      

Lol thanks, but i had already fixed the problem :D

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...