Beluga Posted November 11, 2010 Posted November 11, 2010 addEvent("registerPlayer",true) addEventHandler("registerPlayer",getRootElement(), function(username,password) local xmlFile = xmlLoadFile("players.xml") local playerNode = xmlFindChild(xmlFile,"players",0) if (playerNode) then xmlCreateChild(playerNode,tostring(username)) else xmlCreateChild(xmlFile,"players") end end) This code gives two WARNING: Bad argument errors: Bad argument @ 'xmlNodeFindChild' - line: 5 Bad argument @ 'xmlCreateChild' - line: 9 Someone can help me with this?
dzek (varez) Posted November 11, 2010 Posted November 11, 2010 something is wrong with loading xml Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Beluga Posted November 11, 2010 Author Posted November 11, 2010 (edited) Damn forgot to add to meta.xml Edited November 11, 2010 by Guest
Castillo Posted November 11, 2010 Posted November 11, 2010 make it a folder else you won't be able to edit the data from players.xml. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted November 11, 2010 Posted November 11, 2010 wut Solid? why? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Castillo Posted November 11, 2010 Posted November 11, 2010 if i'm right you can't edit data if the resource is in a zip file, at least never worked like that for me. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted November 11, 2010 Posted November 11, 2010 oh, you are right. thought you are telling to make a folder inside resource and put there that xml file.. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Castillo Posted November 11, 2010 Posted November 11, 2010 lol, that doesn't make any difference. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted November 11, 2010 Posted November 11, 2010 that's why i asked Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Beluga Posted November 11, 2010 Author Posted November 11, 2010 So I just have to put all my scripts in a folder and then it is working?
Beluga Posted November 11, 2010 Author Posted November 11, 2010 Sorry for double post but I put all the files in a folder and not in .zip file but I still get the badArgument thingy!
dzek (varez) Posted November 11, 2010 Posted November 11, 2010 post your meta, post your xml file. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Beluga Posted November 11, 2010 Author Posted November 11, 2010 Meta file: <meta> <info author="Cornelis" type="script"/> <file src="players.xml"/> <script src="gui_s.lua" type="server"/> <script src="gui.lua" type="client"/> </meta> Players xml <players> </players> //EDIT: It don't show any errors anymore but It don't make a subnode in players.xml
dzek (varez) Posted November 11, 2010 Posted November 11, 2010 afair - XML for server side should be loaded in other way than yup, i am right: https://wiki.multitheftauto.com/wiki/Meta.xml Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
DiSaMe Posted November 11, 2010 Posted November 11, 2010 Server-side XML doesn't need to be put into meta.xml. -
Beluga Posted November 12, 2010 Author Posted November 12, 2010 I added this but I don't help I just don't add a subnode into players.xml
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