drifterCZ Posted March 28, 2010 Share Posted March 28, 2010 hi all, i am trying to load an resource by script in my gamemode... script: local res = getResourceFromName ( "test" ) outputChatBox ( "resource found: " ..tostring ( res ) ) local load = startResource ( res ) outputChatBox ( "resourceStart: " ..tostring ( load ) ) BUT here is one problem... it didnt load. log: resource found: userdata: 02C323A8resourceStart: nil it dont write any error. I also have added my resource (the from which is this script) into ACL, in admin group when I start resource in MTAserver window by "start test" it normaly load. if I change the "startResource" function to "restartResource", and then load "test" by admin panel, it normally restart it Do you know where is the problem? If you need to know more, just ask. Thanks! Link to comment
Gamesnert Posted March 28, 2010 Share Posted March 28, 2010 startResource returns false at failure. If nil is returned, it has to be blocked by ACL in some way. (If a function is blocked by ACL, nil is returned) Link to comment
50p Posted March 28, 2010 Share Posted March 28, 2010 startResource returns false at failure. If nil is returned, it has to be blocked by ACL in some way. (If a function is blocked by ACL, nil is returned) Also, you get warning or error message saying that in server console or debug window (/debugscript 2). Link to comment
drifterCZ Posted March 28, 2010 Author Share Posted March 28, 2010 thank you for helping... so I never edited acl, i am not sure i did it right. I have added this into acl.xml (while server off) <group name="Admin"> <acl name="Moderator" /> <acl name="SuperModerator" /> <acl name="Admin" /> <acl name="RPC" /> <object name="user.drifterCZ" /> <object name="resource.admin" /> <object name="resource.webadmin" /> [color=#FF0000][b] <object name="resource.dd" />[/b][/color] </group> (my gamemode is called "dd") Link to comment
Gamesnert Posted March 28, 2010 Share Posted March 28, 2010 Have you reloaded the ACL? (restarting server, aclReload(), ...) Link to comment
drifterCZ Posted March 28, 2010 Author Share Posted March 28, 2010 OK, i have got the problem... its caused by ACL.xml Knows someone why when I add into admin group, it gives the rights to other gamemode but not for my own? Link to comment
50p Posted March 28, 2010 Share Posted March 28, 2010 OK, i have got the problem... its caused by ACL.xml Knows someone why when I add into admin group, it gives the rights to other gamemode but not for my own? You have weird problem there. Lets start from the beginning.. You have given your resource access to startResource, reloaded ACL and even restarted server.. That doesn't help? Does your script outputs error messages? Tried "refreshall" command? Your resource is not special in any way and it should have access to startResource function if you add it to admin group in acl.xml. Link to comment
drifterCZ Posted March 28, 2010 Author Share Posted March 28, 2010 (edited) SOLVED!! Thanx to 50p, without him i could never repair that! I havent noticed that I have already function "startResource" in my script, because it was added many days ago Edited March 28, 2010 by Guest 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