Jumper_Mych Posted January 16, 2011 Posted January 16, 2011 My first working on Gui function () Photo = guiCreateStaticImage( 247, 182, 509, 406, "images/Photo.png", false) ButtonNext = {}Photo = guiCreateButton(248,564,45,24,"Next",false, Photo2) Photo2 = guiCreateStaticImage(247,182,509,406,"images/Photo2.png",false) ButtonPrev = {}Photo2 = guiCreateButton(248,564,45,24,"Prev",false, Photo) end addCommandHandler ( "photo", Photo) Doesnt Work
proracer Posted January 16, 2011 Posted January 16, 2011 You have attached command handler to non-existing function. Try this: function Photo1() Photo = guiCreateStaticImage( 247, 182, 509, 406, "images/Photo.png", false) ButtonNext = {}Photo = guiCreateButton(248,564,45,24,"Next",false, Photo2) Photo2 = guiCreateStaticImage(247,182,509,406,"images/Photo2.png",false) ButtonPrev = {}Photo2 = guiCreateButton(248,564,45,24,"Prev",false, Photo) end addCommandHandler ( "photo", Photo1)
12p Posted January 16, 2011 Posted January 16, 2011 function Photo1() Photo = guiCreateStaticImage( 247, 182, 509, 406, "images/Photo.png", false) Photo2 = guiCreateStaticImage(247,182,509,406,"images/Photo2.png",false) ButtonNext = guiCreateButton(248,564,45,24,"Next",false, Photo2) ButtonPrev = guiCreateButton(248,564,45,24,"Prev",false, Photo) end addCommandHandler ( "photo", Photo1)
proracer Posted January 16, 2011 Posted January 16, 2011 Try this uhm: StaticImage = {} Buttons = {} function Photo1() StaticImage[1] = guiCreateStaticImage(247,182,509,406, "images/Photo.png", false) StaticImage[2] = guiCreateStaticImage(247,182,509,406,"images/Photo2.png", false) Buttons[1] = guiCreateButton(248,564,45,24,"Prev",false,StaticImage[1]) Buttons[2] = guiCreateButton(248,564,45,24,"Next",false,StaticImage[2]) end addCommandHandler("photo", Photo1)
Jumper_Mych Posted January 16, 2011 Author Posted January 16, 2011 Doesn't work Type /Photo next nothing
proracer Posted January 16, 2011 Posted January 16, 2011 1.Make sure this is clientside. 2.You must have your pictures in the same dir as stated in your script. 3.Add your pictures to meta file. 4.Type "/debugscript 2" and tell your errors.
Jumper_Mych Posted January 16, 2011 Author Posted January 16, 2011 1.Make sure this is clientside.2.You must have your pictures in the same dir as stated in your script. 3.Add your pictures to meta file. 4.Type "/debugscript 2" and tell your errors. 1. <meta> <info author="Jumper_Mych" name="Photo" version="0.1 /> <script src="Microsoft.lua"/> <file src="images/Photo.png"/> <file src="images/Photo2.png"/> </meta> 2.Ready 3.Ready 4.No has error Doesn't Work
proracer Posted January 16, 2011 Posted January 16, 2011 Where is the type of script ...? <meta> <info author="Jumper_Mych" name="Photo" version="0.1 /> <script src="Microsoft.lua" type="client" /> <file src="images/Photo.png"/> <file src="images/Photo2.png"/> </meta>
Jumper_Mych Posted January 16, 2011 Author Posted January 16, 2011 <script src="Microsoft.lua" type="client" /> But doesn't Work Unless we code big error
bartekPL Posted January 16, 2011 Posted January 16, 2011 <info author="Jumper_Mych" name="Photo" version="0.1 /> version="0.1 /> :D Should be: version="0.1" />
Jumper_Mych Posted January 16, 2011 Author Posted January 16, 2011 Thanks You! xDD Version is Idiot xDD
Castillo Posted January 17, 2011 Posted January 17, 2011 Jumper, i would recommend you to start searching before ask something.
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