nikitafloy Posted April 22, 2014 Posted April 22, 2014 With each start up any resource - found errors.
Dealman Posted April 22, 2014 Posted April 22, 2014 Can't really help you without the code. That function requires a account element to check if it's a guest account or not. Whatever you referenced to is returning a boolean - true or false.
nikitafloy Posted April 22, 2014 Author Posted April 22, 2014 Can't really help you without the code.That function requires a account element to check if it's a guest account or not. Whatever you referenced to is returning a boolean - true or false. The problem is not in error. Problem: When I start any resource function is started from another resource (campolice). onResourceStart(and client) only that: function crColSp () for _,k in pairs (coorSphere) do colPay = createColSphere ( k[1], k[2], k[3], k[4] ) detect = createColSphere ( k[1], k[2], k[3], k[4]+120 ) end for _,k in pairs (cams_lamp) do createObject ( k[1], k[2], k[3], k[4], k[5], k[6], k[7] ) end end addEventHandler( 'onResourceStart', getRootElement ( ), crColSp )
Dealman Posted April 22, 2014 Posted April 22, 2014 Change it to; function crColSp () for _,k in pairs (coorSphere) do colPay = createColSphere ( k[1], k[2], k[3], k[4] ) detect = createColSphere ( k[1], k[2], k[3], k[4]+120 ) end for _,k in pairs (cams_lamp) do createObject ( k[1], k[2], k[3], k[4], k[5], k[6], k[7] ) end end addEventHandler( 'onResourceStart', resourceRoot, crColSp ) Problem was the event handler was being run every time any resource started. Instead of only when itself started.
nikitafloy Posted April 22, 2014 Author Posted April 22, 2014 Change it to; function crColSp () for _,k in pairs (coorSphere) do colPay = createColSphere ( k[1], k[2], k[3], k[4] ) detect = createColSphere ( k[1], k[2], k[3], k[4]+120 ) end for _,k in pairs (cams_lamp) do createObject ( k[1], k[2], k[3], k[4], k[5], k[6], k[7] ) end end addEventHandler( 'onResourceStart', resourceRoot, crColSp ) Problem was the event handler was being run every time any resource started. Instead of only when itself started. Oh... thx u! I'll remember that! I'm having this problem even with some of my scripts. Now I'll know!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now