Jump to content

[BUG] Failed to call [string "?"]


DriFtyZ

Recommended Posts

Exact what the title says, i can't figure it out what is wrong with a simple exports code im testing, thanks!

error: Failed to call '[DWN]Core:showErrorCode'[string "?"]

code to call the function:
 

exports["[DWN]Core"]:showErrorCode(player, "02")

code of the exported function:

function showErrorCode (player, int)
	if player then
		if int == "02" then
			-- Some random code to excecute here
      		outputChatBox("It Works!")
		end
	end
end


 

Link to comment
  • Moderators
call(getResourceFromName("[DWN]Core"), "showErrorCode", player, "02)

Try to use call instead. The exports function does not always work correctly, I haven't figured out the reason of that.

 

Btw it is not recommended to use special characters in your resources names. [DWN]Core

Those brackets are used to make folders invisible for the server. [invisible]

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