Jump to content

Help with exports


HereIsTheOne

Recommended Posts

Hello, I'm making a RP Gamemode and I'm creating the Character Creation System.

When I login I go to the character selector, but I don't know what I'm doing wrong, I can't 'connect' or pass information througth resources. Here is the code:

LOGIN_SERVER.lua [Resource login]

-- ... other code
function login(username, password)
			local account = getAccount(string.lower(username), password)
			logIn (source, account, password)
			setPlayerName(source, username)
			outputChatBox("#00BBFFServer:#FFFFFF Welcome again, #00BBFF"..getPlayerName(source),source,0,255,0, true)
			if (accData.players == 0) then -- accData gets rows from MySQL, it works fine
				setTimer ( delayedChat, 1000, 1, "#00BBFFServer:#A60019 Opening the creator...")
				setTimer ( startCreator, 2000, 1, getResourceRootElement(getThisResource()) )
			end
end

function startCreator ()
	exports.creator:makeCreator()
end
-- .. more code

CREATOR_CLIENT.lua [Resource creator]

function createWindow()
	outputChatBox ( "WE ARRIVE!!" )
end
addEvent( "makeWindow", true )
addEventHandler( "makeWindow", getLocalPlayer(), createWindow )

CREATOR_SERVER [Resource creator]

function startCreator ( )
	triggerClientEvent ( getResourceRootElement(getThisResource()), "makeWindow", getResourceRootElement(getThisResource()) )
end

 

Thare's an easiest way to make it or I'm going well with these system?

At these time, the outputmessage don't show and the server output is fine, no error messages. Someone can help me? Thanks!

Link to comment
  • Moderators

Please.

  • Add more debug lines.
  • Do a hard refresh. (/refreshall)

Because if an export goes wrong, there is NO WAY you get no error/warning. Unless the export code hasn't been executed OR it has been executed but the code that should show this indication 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...