nikitafloy Posted April 22, 2014 Share Posted April 22, 2014 With each start up any resource - found errors. Link to comment
Dealman Posted April 22, 2014 Share 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. Link to comment
nikitafloy Posted April 22, 2014 Author Share 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 ) Link to comment
Dealman Posted April 22, 2014 Share 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. Link to comment
nikitafloy Posted April 22, 2014 Author Share 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! Link to comment
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