Jump to content

Hello, simple script problem.


Rachhet

Recommended Posts

function
outputChatBox ( "No hejka", getRootElement(), 255, 255, 255, true )
end
addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn )

How can i fix this? 

ERROR: Loading script failed: [gameplay]/pierwszyskrypt/client.lua:2: name> or '...' expected near '"No hejka"'

Link to comment
3 minutes ago, Rachhet said:

function
outputChatBox ( "No hejka", getRootElement(), 255, 255, 255, true )
end
addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn )

How can i fix this? 

ERROR: Loading script failed: [gameplay]/pierwszyskrypt/client.lua:2: name> or '...' expected near '"No hejka"'

function test ()
outputChatBox ( "No hejka", source, 255, 255, 255, true )
end
addEventHandler ( "onPlayerSpawn", getRootElement(), test )


or 

addEventHandler ( "onPlayerSpawn", getRootElement(), 
function()
outputChatBox ( "No hejka", source, 255, 255, 255, true )
end
)

2 works fine 

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