Jump to content

Dreft's questions


Dreft

Recommended Posts

I don't want to make new topic every time when i want to ask something so I ask here if i had problems :)

So i start:

I get this error:

[02:11:19] ERROR: ...RVER THUNDER_FR/mods/deathmatch/resources/efr/fr.lua:39: attempt to call global 'guiCreateWindow' (a nil value) 

Line 39 is

    LoginWindow = guiCreateWindow (423,209,376,102,"Prisijunkite...",false) 

Why this error appears? :/

P.S. To create my GUI i used https://forum.multitheftauto.com/viewtop ... 91&t=22831 this.

Waiting for help ;)

Link to comment

One .lua file does not a resource make. A resource can contain any number of script files you'll likely need, but for the sake of neatness, I suggest you at least use different .lua files for different things. Functions and variables can be used between files in the same resource completely seamlessly. Inter-resource communication isn't quite that easy (you'll need to export functions, or declare events) although it's hardly a major problem. Ultimately it's up to you, but there's no need to jumble everything up in one massive file like in, for example, SA-MP.

Link to comment
One .lua file does not a resource make. A resource can contain any number of script files you'll likely need, but for the sake of neatness, I suggest you at least use different .lua files for different things. Functions and variables can be used between files in the same resource completely seamlessly. Inter-resource communication isn't quite that easy (you'll need to export functions, or declare events) although it's hardly a major problem. Ultimately it's up to you, but there's no need to jumble everything up in one massive file like in, for example, SA-MP.

Mhm, ok.

http://development.mtasa.com/index.php? ... ng_the_GUI

Is this really works ? Because i do everything like here, but when i press button - nothing happens :/ Maybe there is problem in that article ?

Link to comment
function onClientGUIClick ( button, state, absoluteX, absoluteY )

No. It's an event and you don't call events like that. Until you learn what you're talking about, please do the entire forum a favor and shut the hell up...

I've told you this before and, what's worse, I'm pretty sure I'm not the only one who has.

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