Jump to content

Annoying Messed up error's


Recommended Posts

Getting this error no idea why

  
addEventHandler("test", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.button[1] = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, GUIEditor.window[1])     
    end 
) 
  
function jetpackPanel(keyPresser) 
    if guiGetVisible(GUIEditor.window[1]) then 
        guiSetVisible(GUIEditor.window[1], false) 
        showCursor(false, false) 
    else 
        guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true, true) 
    end 
end 
bindKey("f9", "down", GUIEditor.window[1]) 

I get this error

ERROR: AJetPack\client.lua:20: attempt to index global 'GUIEditor' (a nil value)

Link to comment
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        myWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
        guiWindowSetSizable(myWindow, false) 
        guiSetVisible(myWindow,false) 
  
        JetpackButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, myWindow)     
    end 
) 
  
function jetpackPanel(keyPresser) 
    if guiGetVisible(myWindow) then 
        guiSetVisible(myWindow, false) 
        showCursor(false, false) 
    else 
        guiSetVisible(myWindow, true) 
        showCursor(true, true) 
    end 
end 
bindKey("f9", "down", jetpackPanel) 

Link to comment
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        myWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
        guiWindowSetSizable(myWindow, false) 
        guiSetVisible(myWindow,false) 
  
        JetpackButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, myWindow)     
    end 
) 
  
function jetpackPanel(keyPresser) 
    if guiGetVisible(myWindow) then 
        guiSetVisible(myWindow, false) 
        showCursor(false, false) 
    else 
        guiSetVisible(myWindow, true) 
        showCursor(true, true) 
    end 
end 
bindKey("f9", "down", jetpackPanel) 

I get this error WARNING: Bad Arguement @ 'bindKey'

Link to comment
GUIEditor = { 
button = {} 
} 
    addEventHandler("test", resourceRoot, 
        function() 
            GUIEditor.window[1] = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
            guiWindowSetSizable(GUIEditor.window[1], false) 
      
            GUIEditor.button[1] = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, GUIEditor.window[1])     
        end 
    ) 
      
    function jetpackPanel(keyPresser) 
        if guiGetVisible(GUIEditor.window[1]) then 
            guiSetVisible(GUIEditor.window[1], false) 
            showCursor(false, false) 
        else 
            guiSetVisible(GUIEditor.window[1], true) 
            showCursor(true, true) 
        end 
    end 
    bindKey("f9", "down", GUIEditor.window[1]) 

Link to comment
GUIEditor = { 
button = {} 
} 
    addEventHandler("test", resourceRoot, 
        function() 
            GUIEditor.window[1] = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
            guiWindowSetSizable(GUIEditor.window[1], false) 
      
            GUIEditor.button[1] = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, GUIEditor.window[1])     
        end 
    ) 
      
    function jetpackPanel(keyPresser) 
        if guiGetVisible(GUIEditor.window[1]) then 
            guiSetVisible(GUIEditor.window[1], false) 
            showCursor(false, false) 
        else 
            guiSetVisible(GUIEditor.window[1], true) 
            showCursor(true, true) 
        end 
    end 
    bindKey("f9", "down", GUIEditor.window[1]) 

Getting this error :/

ERROR: AJetpack\client.lua:22: attempt to index field 'window' (a nil value)

Link to comment
GUIEditor.window = {} 
GUIEditor.button = {} 
  
  
addEvent("test", true ) 
-- You forget the event  
addEventHandler("test", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        GUIEditor.button[1] = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, GUIEditor.window[1])     
    end 
) 
  
  
   
bindKey("f9", "down",  
function () 
  if guiGetVisible(GUIEditor.window[1]) then 
        guiSetVisible(GUIEditor.window[1], false) 
        showCursor(false, false) 
    else 
        guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true, true) 
    end 
end) 

@manve

You need to add those tables because you are storing it in the table, because when you are making 2 GUI's in GUIeditor, it will create number "2" instead of number "1"

Edited by Guest
Link to comment
GUIEditor.window = {} 
GUIEditor.button = {} 
  
  
addEvent("test", true ) 
-- You forget the event  
addEventHandler("test", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        GUIEditor.button[1] = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, GUIEditor.window[1])     
    end 
) 
  
wtf? That's not helping... 
  
   
bindKey("f9", "down",  
function () 
  if guiGetVisible(GUIEditor.window[1]) then 
        guiSetVisible(GUIEditor.window[1], false) 
        showCursor(false, false) 
    else 
        guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true, true) 
    end 
end) 
 

@manve

You need to add those tables because you are storing it in the table, because when you are making 2 GUI's in GUIeditor, it will create number "2" instead of number "1"

Link to comment

function GUI() 
theWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
guiWindowSetSizable(theWindow, false) 
theButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, theWindow)     
end 
addEvent("test",true) 
addEventHandler("onClientResourceStart",resourceRoot,GUI) 
addEventHandler("test",resourceRoot,GUI) 
      
  
  
bindKey ("f9", "down", 
    function()   
    guiSetVisible(theWindow, not guiGetVisible(theWindow)) 
    showCursor(guiGetVisible(theWindow)) 
    end  
) 
Link to comment
function GUI() 
theWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
guiWindowSetSizable(theWindow, false) 
theButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, theWindow)     
end 
addEvent("test",true) 
addEventHandler("onClientResourceStart",resourceRoot,GUI) 
addEventHandler("test",resourceRoot,GUI) 
      
  
  
bindKey ("f9", "down", 
    function()   
    guiSetVisible(theWindow, not guiGetVisible(theWindow)) 
    showCursor(guiGetVisible(theWindow)) 
    end  
) 

Got this error :/

WARNING: AJetPack\client.lua:12: Bad Argument @ 'bindKey'

Link to comment
function GUI() 
    theWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
    guiWindowSetSizable(theWindow, false) 
    theButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, theWindow)     
end 
addEvent("test",true) 
addEventHandler("onClientResourceStart",resourceRoot,GUI) 
addEventHandler("test",resourceRoot,GUI)  
     
  
     
function openWin() 
    if guiGetVisible(theWindow) then 
        guiSetVisible(theWindow, false) 
        showCursor(false) 
    else 
        guiSetVisible(theWindow, true) 
        showCursor(true) 
    end 
end 
bindKey("F9", "down", openWin) 

Link to comment
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        myWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
        guiWindowSetSizable(myWindow, false) 
        guiSetVisible(myWindow,false) 
  
        JetpackButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, myWindow)     
    end 
) 
  
function jetpackPanel(keyPresser) 
    if guiGetVisible(myWindow) then 
        guiSetVisible(myWindow, false) 
        showCursor(false, false) 
    else 
        guiSetVisible(myWindow, true) 
        showCursor(true, true) 
    end 
end 
bindKey("f9", "down", jetpackPanel) 

I get this error WARNING: Bad Arguement @ 'bindKey'

Because the key is "F9" and not "f9".

Link to comment

Ops, just realized i f'd up the meta.xml lol thanks for your help

Edit my problem is The gui shows on startup and closes with F5 but i don't want it to show on start up :/

code:

function GUI() 
    theWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
    guiWindowSetSizable(theWindow, false) 
    theButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, theWindow)     
end 
addEvent("test",true) 
addEventHandler("onClientResourceStart",resourceRoot,GUI) 
addEventHandler("test",resourceRoot,GUI) 
    
  
    
function openWin() 
    if guiGetVisible(theWindow) then 
        guiSetVisible(theWindow, false) 
        showCursor(false) 
    else 
        guiSetVisible(theWindow, true) 
        showCursor(true) 
    end 
end 
bindKey("F5", "down", openWin) 
  
  
  

Link to comment
    theWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
    guiWindowSetSizable(theWindow, false) 
    theButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, theWindow)     
    guiSetVisible(theWindow,false) 
     
function openWin() 
  
    if guiGetVisible(theWindow) then 
  
        guiSetVisible(theWindow, false) 
  
        showCursor(false) 
  
    else 
  
        guiSetVisible(theWindow, true) 
  
        showCursor(true) 
  
    end 
  
end 
  
bindKey("F5", "down", openWin) 
  

Try this.

Link to comment
    theWindow = guiCreateWindow(420, 210, 433, 320, "Jetpack giver By Robbster", false) 
    guiWindowSetSizable(theWindow, false) 
    theButton = guiCreateButton(122, 123, 188, 87, "Give yourself Jetpack", false, theWindow)     
    guiSetVisible(theWindow,false) 
     
function openWin() 
  
    if guiGetVisible(theWindow) then 
  
        guiSetVisible(theWindow, false) 
  
        showCursor(false) 
  
    else 
  
        guiSetVisible(theWindow, true) 
  
        showCursor(true) 
  
    end 
  
end 
  
bindKey("F5", "down", openWin) 
  

Try this.

Thanks it works!

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