Jump to content

attempt to call global guiCreateWindow (a nil value)


Recommended Posts

function mecanico()
        Mecanico = guiCreateWindow(369, 238, 280, 269, "Panel Reparacion", true)
        guiWindowSetSizable(Mecanico, false)
        fixVehicle = guiCreateButton(0.05, 0.37, 0.38, 0.25, "Acepto reparar mi vehiculo", false, Mecanico)
        guiSetProperty(fixVehicle, "NormalTextColour", "FFAAAAAA")
        cerrar = guiCreateButton(157, 100, 106, 67, "No gracias", false, Mecanico)
        guiSetProperty(cerrar, "NormalTextColour", "FFAAAAAA")
        memo = guiCreateMemo(73, 34, 151, 47, "Se te descontaran $500    para la reparacion\n", false, Mecanico)
        guiMemoSetReadOnly(memo, true)    
end
addCommandHandler ("meca", mecanico)

Link to comment
48 minutes ago, tomasitopiola said:

function mecanico()
        Mecanico = guiCreateWindow(369, 238, 280, 269, "Panel Reparacion", true)
        guiWindowSetSizable(Mecanico, false)
        fixVehicle = guiCreateButton(0.05, 0.37, 0.38, 0.25, "Acepto reparar mi vehiculo", false, Mecanico)
        guiSetProperty(fixVehicle, "NormalTextColour", "FFAAAAAA")
        cerrar = guiCreateButton(157, 100, 106, 67, "No gracias", false, Mecanico)
        guiSetProperty(cerrar, "NormalTextColour", "FFAAAAAA")
        memo = guiCreateMemo(73, 34, 151, 47, "Se te descontaran $500    para la reparacion\n", false, Mecanico)
        guiMemoSetReadOnly(memo, true)    
end
addCommandHandler ("meca", mecanico)

Hi, did u wrote this code client side right? (in client script)

Check your meta.xml to see if your script is client side or server side.

If is type server then replace server with type="client" like in the example i wrote below.

<meta>
  <script src="mecanico_c.lua" type="client" />
  </meta>

 

Edited by FlorinSzasz
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...