Jump to content

Getting an error (Extends block switch is not specified for block shieldSwitchMaster)


Twila

Recommended Posts

So the error says "Extends block switch is not specified for block shieldSwitchMaster"

and it stops the game from running

 

here's two sections of the code from the blocks.xml config file

 

<block id="2002" name="switch">
<property name="Class" value="Switch"/>
<property name="Material" value="Mmetal_weak"/>
<property name="StabilitySupport" value="false"/>
<property name="Shape" value="ModelEntity"/>
<property name="Mesh" value="models"/>
<property name="Model" value="Entities/Electrical/power_switchPrefab"/> <property name="HandleFace" value="South"/>
<property name="ImposterDontBlock" value="true"/>
<property name="RequiredPower" value="0"/>
<property name="TriggerType" value="Switch"/>
<property name="Group" value="Science"/>
<property class="RepairItems"> <property name="forgedIron" value="2"/> </property>
<drop event="Destroy" name="scrapIron" count="5" prob="1"/>
<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
<property name="TakeDelay" value="5"/>
<property name="EconomicValue" value="50"/>
</block>

 

and what I just added to get the error:

 

<block id="1493" name="shieldSwitchMaster">
<property name="Extends" value="switch"/>
<property name="Material" value="bedrock"/>
</block>
<block id="1494" name="switchRed">
<property name="Extends" value="shieldSwitchMaster"/>
</block>

Link to comment
Share on other sites

^ what these two said.

 

The block you are extending FROM must load before the others. In your case, switch is 2002 and your others are 1493 and 1494.

 

I'll bet if you put them on 2018 and 2019, they'd work fine.

 

List of free block ID's to help: https://7daystodie.com/forums/showthread.php?69080-TIP-Alpha-16-0-Current-quot-Free-quot-blocks-xml-IDs

 

It's actually a pretty rookie coding mistake for me to make

You usually can't extend something above the parent (the Master was 1500 lines above the switch)

I just cut the second code and pasted it below the first. I didn't need to change the ID numbers.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...