justn Posted March 16, 2014 Posted March 16, 2014 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)
Anubhav Posted March 16, 2014 Posted March 16, 2014 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)
Anubhav Posted March 16, 2014 Posted March 16, 2014 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
cheez3d Posted March 16, 2014 Posted March 16, 2014 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.
justn Posted March 16, 2014 Author Posted March 16, 2014 (edited) 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 March 16, 2014 by Guest
Karuzo Posted March 16, 2014 Posted March 16, 2014 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 ?
justn Posted March 16, 2014 Author Posted March 16, 2014 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 ? ..
Dealman Posted March 16, 2014 Posted March 16, 2014 (edited) Only guiSetVisible needs a boolean argument, guiGetVisible doesn't. It only needs the GUI element. The if statement should be written like this; if(guiGetVisible(Phone_Image) == true) then Edited March 16, 2014 by Guest
#Rmad~> Posted March 16, 2014 Posted March 16, 2014 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 )
justn Posted March 16, 2014 Author Posted March 16, 2014 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now