Jump to content

Annoying Messed up error's


Recommended Posts

Posted

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)

Posted

gui editor scripts need a table (( not sure why )), but for some reason when you use gui editor, u must re-name windows, memos, ect ... or add the tables (( if you know what i mean ))

Looking for tutorials or information? check out: www.simpleask.co.uk

Posted
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) 

Please do not PM me with scripting related question nor support, use the forums instead.

Posted
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'

Posted
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]) 

Posted
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)

Posted (edited)
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

Sometimes I dream about cheese

Posted
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"

Posted

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  
) 

  

Posted
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'

Posted
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) 

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

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

Please do not PM me with scripting related question nor support, use the forums instead.

Posted

Well, I tested and it worked for me.

Please do not PM me with scripting related question nor support, use the forums instead.

Posted

I'm sure that there is another part of the script causing this ..

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

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) 
  
  
  

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

mtaubluascripter.png
Posted
    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!

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