Sign in to follow this  
GM_Goulart

QUE MANÉ STRING

Recommended Posts

Olá.

Estou enfrentado outro problema, não faz sentido isso acontecer.

function byType(vehicle, player)

	local var = getElementType(vehicle)
	outputChatBox("Bom jogo.", player)

end
addCommandHandler("type", byTipe)

O erro é: WARNING: [SS]\CNH\CNH.Lua:101 Bad argument @ 'outputChatBox' [Expected element at argument 2, got string 'type']. Eu não sei mais o que fazer, sem alguém puder dar uma luz, por favor. Retribuo com 'Thanks'.

Share this post


Link to post
function byType(vehicle)

	local var = getElementType(vehicle)
	outputChatBox("Bom jogo.", source)

end
addCommandHandler("type", byTipe)

 

Tenta isso

 

  • Thanks 1

Share this post


Link to post

Parâmetros da função addCommandHandler (server-side):

player playerSource, string commandName [, string arg1, string arg2, ... ] 

Ou seja, faz todo sentido acontecer.

  • Thanks 1

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.