Wysłany: 2014-06-06, 14:59
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Albo ja jestem ?lepy, albo tu nie ma b??du, a wywala mi b??d wpisany w outputDebugString.
Nigdy tego problemu nie mia?em, kod stworzony jest poprawnie wi?c....
addEventHandler ( "onResourceStart" , getResourceRootElement ( getThisResource ()), function( nazwa )
skrypt = getResourceName ( nazwa )
xml = xmlLoadFile ( "auta.xml" )
if not xml then
outputDebugString ( "Problem z plikiem auta.xml" ) return end
for Key , Value in ipairs ( xmlNodeGetChildren ( xml )) do
pojazd = xmlFindChild ( Value , "pojazd" , 0 )
id = xmlNodeGetAttribute ( pojazd , "id" )
id = tonumber ( id )
x = xmlNodeGetAttribute ( pojazd , "x" )
x = tonumber ( x )
y = xmlNodeGetAttribute ( pojazd , "y" )
y = tonumber ( y )
z = xmlNodeGetAttribute ( pojazd , "z" )
z = tonumber ( z )
auto = createVehicle ( id , x , y , z )
outputChatBox ( "Pojazdy ze skryptu [ " .. skrypt .. " ] by PanMaszyna zosta?y stworzone" , root , 255 , 255 , 255 )
end
end )
Wysłany: 2014-06-07, 19:23
xHardus
Wiek: 27 Na forum: 4786 dni Posty: 90
Nick w MP: Harduś
Piwa : 786
Zobacz
xmlUnloadFile ( xml )
czy tak
xmlUnloadFile ( xmlauta )
Skrypt powinna dzialac
Więcej szczegółów
Wystawiono 2 piw(a):Mezo. , psychol.
Wysłany: 2014-06-07, 19:32
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
rafox12345 , co Ci da unloadFile ? Chodzi mi o b??d warunkowy outputDebugString.
Wysłany: 2014-06-07, 20:09
maxerxxl
Wiek: 30 Na forum: 5067 dni Posty: 285
Nick w MP: MaXI
Piwa : 38
if not xml then
outputDebugString ( "Problem z plikiem auta.xml")
return end
Tagi: xml
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: