Category | Scripting |
Created | 02.04.2010 14:50 |
Andy L. (Unknown) | 02.04.2010 14:54 |
---|---|
Hi, I can't create a new xml in a new folder! createXMLFile Description Create an empty XML file Definition function createXMLFile(string objectName, string filename, string rootNodeName) Arguments string objectName internal name for the object created string filename filename (full path) string rootNodeName name of the root node i used: function InterceptorInput:load() InterceptorPath = g_savegamePath.."/Interceptor/InterceptorInput.xml" end function InterceptorInput:createXMLFile(InterceptorInputScript, InterceptorPath, InterceptorInput) I know rootnode (InterceptorInput) is not right! But, which String i must use? I would like to save something for all savegames and all Vehicles! Greetings, Interceptor |
Andy L. (Unknown) | 03.04.2010 22:39 |
---|---|
ok, g_savegamePath is wrong it's the way to savegames.xml now i use test2 = string.len (_G.g_savegamePath) test3 = test2 - 13 test4 = string.sub (_G.g_savegamePath, 0, test3) test5 = test4.."Interceptor/Interceptor.xml" but, no file created Ok, LS can't create folders! Now it runs with io.open! |
Stefan Geiger - GIANTS Software | 21.04.2010 07:53 |
---|---|
You can use the engine function createFolder to create new folders. |
Andy L. (Unknown) | 21.04.2010 23:13 |
---|---|
Big Thx! Thats it! :) |
Note: Log in to post. Create a new account here.