driver2 Posted January 9, 2010 Share Posted January 9, 2010 Hi, are clientside resource-parts always started in the same order the resource starts serverside. For example if a resource depends on another and a player joins, while both resources were previoulsy started in the correct order. Will this always work? Greetings Link to comment
driver2 Posted January 9, 2010 Author Share Posted January 9, 2010 Hi, are clientside resource-parts always started in the same order the resource starts serverside. For example if a resource depends on another and a player joins, while both resources were previoulsy started in the correct order. Will this always work? Greetings Link to comment
50p Posted January 9, 2010 Share Posted January 9, 2010 Resources are started asynchronously which means they don't have specific order. AFAIK, if you resources in your meta.xml they will start in the order specified in meta.xml but the order doesn't matter for client-side scripts. Link to comment
50p Posted January 9, 2010 Share Posted January 9, 2010 Resources are started asynchronously which means they don't have specific order. AFAIK, if you resources in your meta.xml they will start in the order specified in meta.xml but the order doesn't matter for client-side scripts. Link to comment
driver2 Posted January 9, 2010 Author Share Posted January 9, 2010 Of course they are started in a specific order. When I first 'start x' and then 'start y' 'x' start before 'y'. And the order also matters. When y needs x to work, x needs to be started before y. Link to comment
driver2 Posted January 9, 2010 Author Share Posted January 9, 2010 Of course they are started in a specific order. When I first 'start x' and then 'start y' 'x' start before 'y'. And the order also matters. When y needs x to work, x needs to be started before y. Link to comment
50p Posted January 9, 2010 Share Posted January 9, 2010 Of course they are started in a specific order. When I first 'start x' and then 'start y' 'x' start before 'y'. And the order also matters. When y needs x to work, x needs to be started before y. Yes that is in order if you use "start" and "stop". When you use "restart" command, it doesn't always stop your resource before it starts again. Sometimes new instance (not sure it it's completely new) of the same resource is started but the old one is still running for a split second. That's what I meant by asynchronously. This was the problem when I was making a patch for MTA to let scripters to add their own custom fonts for their scripts. MTA kept crashing because I tried to create a font that already existed (new instance was started and was trying to create a font but old one wasn't stopped previously so font was not removed). Link to comment
50p Posted January 9, 2010 Share Posted January 9, 2010 Of course they are started in a specific order. When I first 'start x' and then 'start y' 'x' start before 'y'. And the order also matters. When y needs x to work, x needs to be started before y. Yes that is in order if you use "start" and "stop". When you use "restart" command, it doesn't always stop your resource before it starts again. Sometimes new instance (not sure it it's completely new) of the same resource is started but the old one is still running for a split second. That's what I meant by asynchronously. This was the problem when I was making a patch for MTA to let scripters to add their own custom fonts for their scripts. MTA kept crashing because I tried to create a font that already existed (new instance was started and was trying to create a font but old one wasn't stopped previously so font was not removed). Link to comment
driver2 Posted January 10, 2010 Author Share Posted January 10, 2010 I still don't know though what to do with my script and whether I can count on the resources starting in the same order clientside, as they were started serverside. Link to comment
driver2 Posted January 10, 2010 Author Share Posted January 10, 2010 I still don't know though what to do with my script and whether I can count on the resources starting in the same order clientside, as they were started serverside. Link to comment
50p Posted January 10, 2010 Share Posted January 10, 2010 I still don't know though what to do with my script and whether I can count on the resources starting in the same order clientside, as they were started serverside. Why don't you test it? Add outputDebugString or outputChatBox in each resource to see which one starts first, second, etc. Link to comment
50p Posted January 10, 2010 Share Posted January 10, 2010 I still don't know though what to do with my script and whether I can count on the resources starting in the same order clientside, as they were started serverside. Why don't you test it? Add outputDebugString or outputChatBox in each resource to see which one starts first, second, etc. 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