Jump to content

onResourceStart and a function


pa3ck

Recommended Posts

Hi guys. As far as I know, whenever I use the

addEventHandler 

the syntax is this (this is the exact code I'm using):

addEventHandler('onResourceStart', resRoot, gpsSystem ) 

BUT it wont start with this code. But if I put this:

addEventHandler('onResourceStart', resRoot, gpsSystem() ) 

It is working. Why is that? Also, in debugscript I'm getting a warning when I use the brackets

WARNING: gps_system\c_gps.lua:220 Bad argument @ 'addEventHandler' [Expected function at argument 3, got none] 

Am I this stupid or what? :D Whenever I used an event or command handler I put the function name without brackets.

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