Jump to content

[Problem] My first Gui


Jumper_Mych

Recommended Posts

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 :roll:

Link to comment

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) 

Link to comment
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) 

Link to comment

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) 

Link to comment
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

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...