aleksa.mta Posted February 15, 2014 Share Posted February 15, 2014 So all my scripts were working normally until a day ago. My client-sided scripts suddenly no longer work while server-sided ones do. It's not about my script because I know that there is nothing wrong with it. To confirm that, I copied one of the scripts provided with the scripting guide on mtawiki (and those scripts are 100% correct I guess) but they still don't work. I am also 100% sure that my meta.xml file is fine and that everything is in the correct folder. Even when I type 'start resource' it says that my resource is running and that there are no problems. Yes, I also specified the 'type = "client"' in meta file so that's not it. As I said, no problems whatsoever with the server-sided scripts. What I've already tried: - Restarting server - Restarting MTA - Restarting computer - Reinstalling MTA (to a clean directory) - Trying out different scripts - Making new resource and trying the same with it - Trying out some of the older scripts - Checking to see if host window shows any errors - Asking on other forums - Googling Now there might be one clue. Someone on other forum told me to type 'debugscript 3' in-game and then start the resource. When I did that I got : http://prntscr.com/2smvgz So that's the only thing that might be pointing out to the problem. I hope someone can solve this, thanks in advance! P.S: The script I used is basically : http://prntscr.com/2smvp5 - an example of onClientPlayerJoin event at mtawiki Link to comment
Bonsai Posted February 15, 2014 Share Posted February 15, 2014 That Error message just confirms what you are saying. Clientside scripts aren't loaded. Most likely because they are either not included in meta, because else you would get some "can't find script" message, or you just never actually "start" anywhere in the client scripts. Try to add an outputChatBox on top of one script out of any function and see what happens. Post your meta and a script here. Makes things a lot easier. Link to comment
aleksa.mta Posted February 15, 2014 Author Share Posted February 15, 2014 META: <meta> <script src="welcome.lua" type="client" /> </meta> Script: function main () outputChatBox ("asdasd") end addEventHandler ("onClientPlayerJoin", getRootElement(), main) Made it as simple as possible now, still not working Link to comment
Bonsai Posted February 15, 2014 Share Posted February 15, 2014 I'm not sure, but I think onClientPlayerJoin doesn't show any messages for the player who is joining, because he is still downloading. Try "onClientResourceStart". Link to comment
Karuzo Posted February 15, 2014 Share Posted February 15, 2014 Yeah as Bomsai said use onClientResourceStart and it will work 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