J'en est marre des erreurs ....

  • Auteur de la discussion Auteur de la discussion X4M
  • Date de début Date de début

X4M

Bucheron
18 Juin 2011
306
0
11
Salut

Je mod normalement et quand je fini je recompile mais j'ai tout le temps des erreur la j'en est 20 car j'ai fait un gros bout de code ...
Ca me fait perdre beaucoup de motivation et je voulais savoir si il y a pas un moyen pour comprendre ces erreur ou alors un wiki ou un truc du genre qui regrouperai tout les erreur avec leur solution car j'y comprend rien au erreurs

merci d'avance <3
 
Passé de 20 Erreurs a 6 ca va :D

Erreurs:
Code:
src\minecraft\net\minecraft\src\mod_Plasma.java:21: ';' expected
Plasma Ingot = (new PlasmaIngots(254)).setIconCoord(ModLoader.addOverride("/gui/
items.png", "/mod/PlasmaIngots.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:24: illegal start of expression
public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/
terrain.png", "/mod/PlasmaBlock.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:24: illegal start of expression
public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/
terrain.png", "/mod/PlasmaBlock.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:24: ';' expected
public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/
terrain.png", "/mod/PlasmaBlock.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:28: ')' expected
.setStepSound(Block.soundStoneFootstep);
^

src\minecraft\net\minecraft\src\mod_Plasma.java:33: reached end of file while pa
rsing
}?
^

BlockPlasma.java:
Code:
package net.minecraft.src;
import java.util.Random;
public class BlockPlasma extends BlockRedstoneOre
{
public BlockPlasma(int i, int j)
{
super(i, j, false);
}
public int quantityDropped(Random random)
    {
        return 4 + random.nextInt(2);
    }
}

ItemPlasmaIngots.java:
Code:
package net.minecraft.src;
public class ItemMyitem extends Item
{
public ItemMyitem(int i)
{
super(i);
}
}

mod_Plasma.java:
Code:
package net.minecraft.src;
import java.util.Random;
public class mod_Plasma extends BaseMod
{
public mod_Plasma()
{
ModLoader.RegisterBlock(Plasma);
ModLoader.RegisterBlock(PlasmaIngots);
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ);
{
    for(int i = 0; i < 4; i++)
    {
        int randPosX = chunkX + rand.nextInt(16);
        int randPosY = rand.nextInt(16);
        int randPosZ = chunkZ + rand.nextInt(16);
        (new WorldGenMinable(Block.Plasma.blockID, 7)).generate(
                                          world, rand, randPosX, randPosY, randPosZ);
    }
{
Plasma Ingot = (new PlasmaIngots(254)).setIconCoord(ModLoader.addOverride("/gui/items.png", "/mod/PlasmaIngots.png"))
ModLoader.AddSmelting(Plasma.blockID, new ItemStack(cookedPlasmaIngots));
}
public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/terrain.png", "/mod/PlasmaBlock.png"))
.setHardness(2.0F)
.setResistance(10F)
.setLightValue(10F)
.setStepSound(Block.soundStoneFootstep);
}
public String Version()
{
return "1.7.3";
}
 
Je savais pas comment t'expliquer alors j'ai corrigé tout je pense.
Il y avait des oublis de ) et de ;
{ à la place de }
Des morceaux mal placés, des trucs totalement faux

Compare avec ce que t'avais avant pour comprendre :)


Code:
package net.minecraft.src;
import java.util.Random;
public class mod_Plasma extends BaseMod
{
public mod_Plasma()
{
ModLoader.RegisterBlock(Plasma);
ModLoader.RegisterBlock(PlasmaIngots);
ModLoader.AddSmelting(Plasma.blockID, new ItemStack(cookedPlasmaIngots));
Ingot.iconIndex(ModLoader.addOverride("/gui/items.png", "/mod/PlasmaIngots.png");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ);
{
    for(int i = 0; i < 4; i++)
    {
        int randPosX = chunkX + rand.nextInt(16);
        int randPosY = rand.nextInt(16);
        int randPosZ = chunkZ + rand.nextInt(16);
        (new WorldGenMinable(Plasma.blockID, 7)).generate(
                                          world, rand, randPosX, randPosY, randPosZ);
    }
}
public static Item Ingot = (new PlasmaIngots(254)).setIconCoord(0, 0).setItemName("Ingot");



public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/terrain.png", "/mod/PlasmaBlock.png")))
.setHardness(2.0F)
.setResistance(10F)
.setLightValue(10F)
.setStepSound(Block.soundStoneFootstep).setBlockName("Plasma");

public String Version()
{
return "1.7.3";
}
}
 
Merci énormément :D

J'ai mis ton code et quand je recompile j'ai 17 Erreurs maintenait:
Code:
src\minecraft\net\minecraft\src\mod_Plasma.java:21: ';' expected
Plasma Ingot = (new PlasmaIngots(254)).setIconCoord(ModLoader.addOverride("/gui/
items.png", "/mod/PlasmaIngots.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:24: illegal start of expression
public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/
terrain.png", "/mod/PlasmaBlock.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:24: illegal start of expression
public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/
terrain.png", "/mod/PlasmaBlock.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:24: ';' expected
public static final Block Plasma = (new BlockPlasma(255,ModLoader.addOverride("/
terrain.png", "/mod/PlasmaBlock.png"))
^

src\minecraft\net\minecraft\src\mod_Plasma.java:28: ')' expected
.setStepSound(Block.soundStoneFootstep);
^

src\minecraft\net\minecraft\src\mod_Plasma.java:33: illegal start of type
}package net.minecraft.src;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:33: ';' expected
}package net.minecraft.src;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:33: illegal start of type
}package net.minecraft.src;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:33: ';' expected
}package net.minecraft.src;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:33: <identifier> expected
}package net.minecraft.src;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:34: illegal start of type
import java.util.Random;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:34: ';' expected
import java.util.Random;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:34: illegal start of type
import java.util.Random;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:34: ';' expected
import java.util.Random;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:34: <identifier> expected
import java.util.Random;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:42: ')' expected
Ingot.iconIndex(ModLoader.addOverride("/gui/items.png", "/mod/PlasmaIngots.png")
;
^

src\minecraft\net\minecraft\src\mod_Plasma.java:69: reached end of file while pa
rsing
}?
^
 
Code:
src\minecraft\net\minecraft\src\mod_Plasma.java:33: illegal start of type
}package net.minecraft.src;
^


T'aurais pas rajouter mon code derrière le tien? Ou alors c'est pas du tout mon code que tu as mis

Et j'ai revu une erreur, supprime le ; à la fin de "public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ);"
 
J'avais bien epic fail désolez j'etait crever x)
Il y a encore 1 erreur quand je recompile:
Code:
src\minecraft\net\minecraft\src\mod_Plasma.java:10: ')' expected
Ingot.iconIndex(ModLoader.addOverride("/gui/items.png", "/mod/PlasmaIngots.png")
;
^
 
Apres avoir mis la parenthèse voici 4 Nouvelle Erreurs:
Code:
src\minecraft\net\minecraft\src\mod_Plasma.java:8: cannot find symbol
symbol  : variable PlasmaIngots
location: class net.minecraft.src.mod_Plasma
ModLoader.RegisterBlock(PlasmaIngots);
^

src\minecraft\net\minecraft\src\mod_Plasma.java:9: cannot find symbol
symbol  : variable cookedPlasmaIngots
location: class net.minecraft.src.mod_Plasma
ModLoader.AddSmelting(Plasma.blockID, new ItemStack(cookedPlasmaIngots));
^

src\minecraft\net\minecraft\src\mod_Plasma.java:10: cannot find symbol
symbol  : method iconIndex(int)
location: class net.minecraft.src.Item
Ingot.iconIndex(ModLoader.addOverride("/gui/items.png", "/mod/PlasmaIngots.png")
);
^

src\minecraft\net\minecraft\src\mod_Plasma.java:23: cannot find symbol
symbol  : class PlasmaIngots
location: class net.minecraft.src.mod_Plasma
public static Item Ingot = (new PlasmaIngots(254)).setIconCoord(0, 0).setItemNam
e("Ingot");
^

Stormweaker je vais jamais en vouloir a ceux qui m'aide depuis le début a modder et je te respect apres le mod que tu nous a sorti :D