|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Mon Oct 23, 2006 1:00 am
[1.11] Import XML problem |
Has anyone else had trouble importing? I haven't been able to import settings from either an entire package or a single class.
I have been able to do both in previous versions. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Oct 23, 2006 7:43 pm |
Please post a specific example that isn't working. Changes were made in the Import XML in v1.11 so there might be a bug, but the examples I have tried seem to work.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Tue Oct 24, 2006 2:13 am |
I haven't done any specific testing to try and narrow down a way that does work yet. But I exported everything in the last version to xml and was unable to restore anything.
Then I created this small class in the current version and exported it. I was and still am unable to import it back in.
This was not a clean upgrade. Depending on feedback I was going to delete the folder and try again.
Code: |
<?xml version="1.0" encoding="UTF-8" ?>
<cmud>
<module>
<record id="3148656">
<id>3148656</id>
<kind>5</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>A jet of white smoke shoots from the mouth of the demonic statue</idname>
<options><![CDATA[<opt><TrigColor>-1</TrigColor></opt>]]></options>
<userval/>
<val>#class Sapience
#if (@smokedone = 0) 
 {
 smokeDone = 1
 #say You are done. Push the gate.
 }
#class 0</val>
<comment/>
<name>A jet of white smoke shoots from the mouth of the demonic statue.</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>9</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>29280</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3148655">
<id>3148655</id>
<kind>5</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>A jet of black smoke shoots from the mouth of the demonic statue</idname>
<options><![CDATA[<opt><TrigColor>-1</TrigColor></opt>]]></options>
<userval/>
<val><![CDATA[#class Sapience
#if (@smokedone = 0) 
 {
 #loop (8) 
 {
 #if (%iskey( @arm, %i)<1) 
 {
 #addkey arm {%i=%null}
 }
 }
 #LOOPDB @arm 
 {
 #IF (%val = @armco) 
 {
 push arm %key
 }
 }
 #LOOPDB @arm 
 {
 #IF (0 = (%val = @armco)) 
 {
 pull arm %key
 }
 }
 smokeDone = 1
 }
#class 0]]></val>
<comment/>
<name>A jet of black smoke shoots from the mouth of the demonic statue.</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>9</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>29270</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3148654">
<id>3148654</id>
<kind>5</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname><![CDATA[A jet of ((?:.(?<!black))*) smoke shoots from the mouth of the d]]></idname>
<options><![CDATA[<opt><TrigColor>-1</TrigColor></opt>]]></options>
<userval/>
<val><![CDATA[#class Sapience
#cw white,%1
#if (@smokedone = 0) 
 {
 #if ((@smokecount < 8)) 
 {
 push arm @pushc
 pullc = %eval( @pullc+1)
 pushc = %eval( @pushc+1)
 #addkey arm {@smokecount=%1}
 smokecount = %eval( @smokecount + 1)
 #add colorc.%1 1
 pull arm @pullc
 } 
 {
 push arm @pushc
 #LOOPDB @colorc 
 {
 #IF (%val >= 4) {armco = %key}
 }
 #LOOPDB @arm 
 {
 #IF (%eval( %val = @armco)) 
 {
 #IF (%key != 0) {pull arm %key}
 }
 }
 }
 }
#class 0]]></val>
<comment/>
<name><![CDATA[A jet of ((?:.(?<!black))*) smoke shoots from the mouth of the demonic statue\.]]></name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>73</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>29260</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146921">
<id>3146921</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>smokeDone</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>0</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11930</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146920">
<id>3146920</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>smokecount</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>8</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11920</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146919">
<id>3146919</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>pushc</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>8</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11910</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146918">
<id>3146918</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>pullc</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>8</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11900</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146917">
<id>3146917</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>colorc</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>blue4green1yellow2</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11890</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146916">
<id>3146916</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>armco</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>blue</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11880</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146915">
<id>3146915</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>arm</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>1blue2green3blue4yellow5blue6yellow7blue</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11870</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146528">
<id>3146528</id>
<kind>2</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>howarm</idname>
<options/>
<userval/>
<val>#show Push all the arms in.;#show Pull arm 1;#show After first smoke.;#show Push arm 1;#show Pull arm 2;#show Repeat for all 8 arms;#show Pull all arms that matched.;#show Wait for Smoke.;#show If smoke is white. Push gate to enter;#show If smoke is black.;#show Push all arms that matched.;#show Pull the arms that did not match.</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>8000</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146527">
<id>3146527</id>
<kind>2</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>arm</idname>
<options/>
<userval/>
<val>#class Sapience
colorc = %null
arm = %null
armco = %null
pullc = 1
pushc = 1
smokecount = 1
smokeDone = 0
#LOOP 8 {push arm %i}
pull arm @pullc
#class 0</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>7990</priority>
<flag>128</flag>
<state>0</state>
</record>
<class name="Sapience">
<record id="3145975">
<id>3145975</id>
<kind>1</kind>
<parent>3145760</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>Sapience</idname>
<options/>
<userval/>
<val/>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145760</owner>
<userint>0</userint>
<priority>0</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146527">
<id>3146527</id>
<kind>2</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>arm</idname>
<options/>
<userval/>
<val>#class Sapience
colorc = %null
arm = %null
armco = %null
pullc = 1
pushc = 1
smokecount = 1
smokeDone = 0
#LOOP 8 {push arm %i}
pull arm @pullc
#class 0</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>7990</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146528">
<id>3146528</id>
<kind>2</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>howarm</idname>
<options/>
<userval/>
<val>#show Push all the arms in.;#show Pull arm 1;#show After first smoke.;#show Push arm 1;#show Pull arm 2;#show Repeat for all 8 arms;#show Pull all arms that matched.;#show Wait for Smoke.;#show If smoke is white. Push gate to enter;#show If smoke is black.;#show Push all arms that matched.;#show Pull the arms that did not match.</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>8000</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146915">
<id>3146915</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>arm</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>1blue2green3blue4yellow5blue6yellow7blue</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11870</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146916">
<id>3146916</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>armco</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>blue</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11880</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146917">
<id>3146917</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>colorc</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>blue4green1yellow2</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11890</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146918">
<id>3146918</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>pullc</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>8</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11900</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146919">
<id>3146919</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>pushc</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>8</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11910</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146920">
<id>3146920</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>smokecount</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>8</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11920</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3146921">
<id>3146921</id>
<kind>3</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>smokeDone</idname>
<options><![CDATA[<opt><DefVal/></opt>]]></options>
<userval/>
<val>0</val>
<comment/>
<name>{*}</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>0</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>11930</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3148654">
<id>3148654</id>
<kind>5</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname><![CDATA[A jet of ((?:.(?<!black))*) smoke shoots from the mouth of the d]]></idname>
<options><![CDATA[<opt><TrigColor>-1</TrigColor></opt>]]></options>
<userval/>
<val><![CDATA[#class Sapience
#cw white,%1
#if (@smokedone = 0) 
 {
 #if ((@smokecount < 8)) 
 {
 push arm @pushc
 pullc = %eval( @pullc+1)
 pushc = %eval( @pushc+1)
 #addkey arm {@smokecount=%1}
 smokecount = %eval( @smokecount + 1)
 #add colorc.%1 1
 pull arm @pullc
 } 
 {
 push arm @pushc
 #LOOPDB @colorc 
 {
 #IF (%val >= 4) {armco = %key}
 }
 #LOOPDB @arm 
 {
 #IF (%eval( %val = @armco)) 
 {
 #IF (%key != 0) {pull arm %key}
 }
 }
 }
 }
#class 0]]></val>
<comment/>
<name><![CDATA[A jet of ((?:.(?<!black))*) smoke shoots from the mouth of the demonic statue\.]]></name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>73</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>29260</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3148655">
<id>3148655</id>
<kind>5</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>A jet of black smoke shoots from the mouth of the demonic statue</idname>
<options><![CDATA[<opt><TrigColor>-1</TrigColor></opt>]]></options>
<userval/>
<val><![CDATA[#class Sapience
#if (@smokedone = 0) 
 {
 #loop (8) 
 {
 #if (%iskey( @arm, %i)<1) 
 {
 #addkey arm {%i=%null}
 }
 }
 #LOOPDB @arm 
 {
 #IF (%val = @armco) 
 {
 push arm %key
 }
 }
 #LOOPDB @arm 
 {
 #IF (0 = (%val = @armco)) 
 {
 pull arm %key
 }
 }
 smokeDone = 1
 }
#class 0]]></val>
<comment/>
<name>A jet of black smoke shoots from the mouth of the demonic statue.</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>9</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>29270</priority>
<flag>128</flag>
<state>0</state>
</record>
<record id="3148656">
<id>3148656</id>
<kind>5</kind>
<parent>3145975</parent>
<pkgid>3145728</pkgid>
<enabled>-1</enabled>
<idname>A jet of white smoke shoots from the mouth of the demonic statue</idname>
<options><![CDATA[<opt><TrigColor>-1</TrigColor></opt>]]></options>
<userval/>
<val>#class Sapience
#if (@smokedone = 0) 
 {
 smokeDone = 1
 #say You are done. Push the gate.
 }
#class 0</val>
<comment/>
<name>A jet of white smoke shoots from the mouth of the demonic statue.</name>
<subkind>0</subkind>
<valkind>0</valkind>
<opt>9</opt>
<owner>3145975</owner>
<userint>0</userint>
<priority>29280</priority>
<flag>128</flag>
<state>0</state>
</record>
</class>
</module>
</cmud> |
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Oct 26, 2006 2:53 pm |
Any news on this Zugg?
Am I crazy, or doing something wrong and likely need to read the help file again? |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Oct 26, 2006 5:25 pm |
Not sure, but part of the problem is that you have some entries with the same record ID appearing in the export twice. At the beginning and at the end.
3148654, 3148655, 3148656.
Back up your export and try removing one set of those. |
|
_________________ Asati di tempari! |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Thu Oct 26, 2006 5:40 pm |
Thanks Tech, I'll look at this when I get home. Do a clean install of Cmud and reload this from my mud file. I'll let you guys know. If it makes the multiple entries this go round.
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Oct 27, 2006 12:27 am |
Something must have been corrupted with my install. After deleting the folder and reinstalling cmud all was well.
edit:
*sigh*
Or maybe not. I wrote the above after being able to export and import the above class that had been imported into cmud from a .mud file.
After further testing I have found something that is short and easily reproduceable.
Open cMud and hit escape.
Open the package editor
Create 3 classes in the root of the package.
Export the classes to an xml file. It doesn't matter how you export them, so long as you export all three to the same xml file.
Delete the 3 classes.
Import the xml file.
Click view.
View default packages.
Click on the Default settings tab.
Note that now all of the classes are nested.
This can get very spectacular the more settings that you created. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
|
|