PARKAH Posted July 31, 2013 Posted July 31, 2013 So I looked for a wiki to start MTA scripting, seeming as all the youtube videos were crap and I came across the wiki for MTA Scripting, I followed all the steps and got the resource testing step and came across a error saying; start: Resource could not be found Here is the script I made: local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) (Created using the MTA Script Editor and got the script from the wiki) Here are some pictures: I don't see what I have done wrong, please help!
DiSaMe Posted July 31, 2013 Posted July 31, 2013 Did you create the resource after starting the server? If so, then you need to use 'refresh' command.
PARKAH Posted July 31, 2013 Author Posted July 31, 2013 Nope, well, yes but I restarted the server and tried again.
Baseplate Posted July 31, 2013 Posted July 31, 2013 Console says it couldn't parse meta.xml for the resource, recheck it.
xXMADEXx Posted July 31, 2013 Posted July 31, 2013 use this for the meta: <meta> <script src="script.lua" /> </meta>
Vector Posted July 31, 2013 Posted July 31, 2013 type in server console refreshall or restart server.
Vector Posted July 31, 2013 Posted July 31, 2013 maybe there is something wrong in the meta.xml file. (a XML sintax error). because of that, it cannot be loaded.
Rockero Posted August 1, 2013 Posted August 1, 2013 This is the sintax.... "Name" version="0.0.0" type="script" name="resourcename" />
PARKAH Posted August 1, 2013 Author Posted August 1, 2013 Then mine is; <meta> <info author="PARKAH" version="0.1" name="myserver" description="test" type="gamemode" /> <script src="script.lua" type="server" /> </meta>
K4stic Posted August 1, 2013 Posted August 1, 2013 This is the sintax.... "Name" version="0.0.0" type="script" name="resourcename" /> fail ---- if the lua is server side
aim-killer Posted August 1, 2013 Posted August 1, 2013 -.- ... look at the first picture below : Opened file: C:\program files\MTA San Andreas 1.3\server\mods\deathmatch\resources\poo\script.lua .. notice something? poo ! and look at the second pic dir : ...mods\deathmatch\resources\myserver.. two different folders i guess.. or i am wrong
xXMADEXx Posted August 1, 2013 Posted August 1, 2013 -.- ... look at the first picture below : Opened file: C:\program files\MTA San Andreas 1.3\server\mods\deathmatch\resources\poo\script.lua .. notice something? poo ! and look at the second pic dir : ...mods\deathmatch\resources\myserver.. two different folders i guess.. or i am wrong Huh, good eye.
PARKAH Posted August 1, 2013 Author Posted August 1, 2013 The pictures were taken at different times, I I had tried redoing it all about 10 times. Didn't work any time.
PARKAH Posted August 2, 2013 Author Posted August 2, 2013 Wow, I decided to record me trying to do it and it decided to work when I recorded it Well, thanks everyone for trying to helping, here's the video if you want to watch it https://www.youtube.com/watch?v=gk42cdAdBqM
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