I got here a code

05/16/2011 17:28 marlyandedsel#1
i got a code that does some skill but the problem is I got null variable or object on this, if you can help me here please some just ideas or clue please... im very sorry I'm just kinda retarded. lol!

Quote:
Database.SpellInformation spell = null;
if (shuriken)
spell = Database.SpellTable.SpellInformations[6010][0];
else
{
byte choselevel = 0;
if (spellID == SpellID)
choselevel = attacker.Owner.Spells[spellID].Level;
if (Database.SpellTable.SpellInformations[SpellID] != null && !Database.SpellTable.SpellInformations[SpellID].ContainsKey(choselevel))
choselevel = (byte)(Database.SpellTable.SpellInformations[SpellID].Count - 1);

spell = Database.SpellTable.SpellInformations[SpellID][choselevel];
}
as you can see i got error at the code "spell = Database.SpellTable.SpellInformation[SpellID][choselevel];"

i think its because of the code "Database.SpellInformation spell = null;"

can u help me please....
05/16/2011 17:50 _DreadNought_#2
I can tell you now its not because spell = null.

Would you care to actually post the error?
05/16/2011 18:07 marlyandedsel#3
here the error

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
05/16/2011 18:47 pro4never#4
Place a breakpoint on

spell = Database.SpellTable.SpellInformations[SpellID][choselevel];

Tell us what the spell id and chosen level is as well as how many entries are in spell informations. It could be a number of things...


-Uncoded skills (not in your magictype db)
-Incorrect spell decrypt (unlikely)
-Db issue with loading the magictype
-Character variables as null
-Invalid FINAL spell handling (IE: the error isn't in the section you posted but rather the handling for the skill id OR in the actual final attack handling)
05/16/2011 20:10 marlyandedsel#5
INSERT INTO `cq_magictype` VALUES ('10381', '10381', '0048', 'RadiantPalm', '1', '0', '1', '0000', '0000', '0000', '30100', '0000', '0100', '0000', '0005', '0004', '0055', '0000', '300000', '0030', '40', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '20', '0001', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10382', '10381', '0048', 'RadiantPalm', '1', '0', '1', '0000', '0001', '0000', '30105', '0000', '0100', '0000', '0005', '0004', '0055', '0000', '900000', '0087', '50', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '20', '0001', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10383', '10381', '0048', 'RadiantPalm', '1', '0', '1', '0000', '0002', '0000', '30110', '0000', '0100', '0000', '0005', '0004', '0055', '0000', '2223000', '0051', '70', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '20', '0001', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10384', '10381', '0048', 'RadiantPalm', '1', '0', '1', '0000', '0003', '0000', '30115', '0000', '0100', '0000', '0005', '0004', '0055', '0000', '4320000', '0038', '90', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '20', '0001', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10385', '10381', '0048', 'RadiantPalm', '1', '0', '1', '0000', '0004', '0000', '30120', '0000', '0100', '0000', '0005', '0004', '0055', '0000', '0', '0000', '110', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '20', '0001', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10395', '10395', '0051', 'TyrantAura1', '0', '0', '1', '0000', '0000', '0005', '2', '0000', '0100', '1000000', '0030', '0000', '0092', '0000', '5400', '0900', '20', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10396', '10395', '0051', 'TyrantAura1', '0', '0', '1', '0000', '0001', '0012', '4', '0000', '0100', '1000000', '0030', '0000', '0092', '0000', '12000', '2000', '40', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10397', '10395', '0051', 'TyrantAura1', '0', '0', '1', '0000', '0002', '0018', '6', '0000', '0100', '1000000', '0030', '0000', '0092', '0000', '16500', '2750', '60', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10398', '10395', '0051', 'TyrantAura1', '0', '0', '1', '0000', '0003', '0024', '8', '0000', '0100', '1000000', '0030', '0000', '0092', '0000', '27000', '4500', '80', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10399', '10395', '0051', 'TyrantAura1', '0', '0', '1', '0000', '0004', '0031', '10', '0000', '0100', '1000000', '0030', '0000', '0092', '0000', '0', '0000', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10400', '10400', '0046', 'Serenity111', '0', '0', '0', '0000', '0000', '0010', '0', '0000', '0100', '0010', '0000', '0000', '0000', '0000', '0', '0000', '40', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '50', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10405', '10405', '0006', 'SoulShackle', '1', '0', '0', '0064', '0000', '0014', '0', '0000', '0100', '0060', '0000', '0015', '0106', '0000', '720', '0120', '90', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '10', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10406', '10405', '0006', 'SoulShackle1', '1', '0', '0', '0064', '0001', '0015', '0', '0000', '0100', '0090', '0000', '0015', '0106', '0000', '860', '0143', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '10', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10407', '10405', '0006', 'SoulShackle1', '1', '0', '0', '0064', '0002', '0017', '0', '0000', '0100', '0120', '0000', '0015', '0106', '0000', '960', '0160', '110', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '10', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10408', '10405', '0006', 'SoulShackle1', '1', '0', '0', '0064', '0003', '0018', '0', '0000', '0100', '0150', '0000', '0015', '0106', '0000', '1010', '0168', '115', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '10', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10409', '10405', '0006', 'SoulShackle1', '1', '0', '0', '0064', '0004', '0018', '0', '0000', '0100', '0180', '0000', '0015', '0106', '0000', '0', '0000', '120', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '10', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10415', '10415', '0054', 'WhirlwindKick', '1', '0', '1', '0000', '0000', '0000', '30065', '0000', '0100', '0000', '0003', '0000', '0000', '0000', '167600', '0066', '15', '0000', '0610', '255', '0000', '0', '0000', '0', '0000', '20', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10416', '10415', '0054', 'WhirlwindKick', '1', '0', '1', '0000', '0001', '0000', '30070', '0000', '0100', '0000', '0003', '0000', '0000', '0000', '590000', '0157', '30', '0000', '0610', '255', '0000', '0', '0000', '0', '0000', '20', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10417', '10415', '0054', 'WhirlwindKick', '1', '0', '1', '0000', '0002', '0000', '30075', '0000', '0100', '0000', '0004', '0000', '0000', '0000', '1216800', '0167', '50', '0000', '0610', '255', '0000', '0', '0000', '0', '0000', '20', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10418', '10415', '0054', 'WhirlwindKick', '1', '0', '1', '0000', '0003', '0000', '30080', '0000', '0100', '0000', '0004', '0000', '0000', '0000', '2948000', '0215', '70', '0000', '0610', '255', '0000', '0', '0000', '0', '0000', '20', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10419', '10415', '0054', 'WhirlwindKick', '1', '0', '1', '0000', '0004', '0000', '30085', '0000', '0100', '0000', '0005', '0000', '0000', '0000', '0', '0000', '90', '0000', '0610', '255', '0000', '0', '0000', '0', '0000', '20', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10440', '10420', '0051', 'ElementalAuraMetal', '0', '0', '1', '0000', '0000', '0031', '30', '0000', '0100', '1000000', '0030', '0000', '0096', '0000', '5400', '0900', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10441', '10420', '0051', 'ElementalAuraMetal', '0', '0', '1', '0000', '0001', '0032', '35', '0000', '0100', '1000000', '0030', '0000', '0096', '0000', '12000', '2000', '105', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10442', '10420', '0051', 'ElementalAuraMetal', '0', '0', '1', '0000', '0002', '0034', '40', '0000', '0100', '1000000', '0030', '0000', '0096', '0000', '16500', '2750', '110', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10443', '10420', '0051', 'ElementalAuraMetal', '0', '0', '1', '0000', '0003', '0035', '45', '0000', '0100', '1000000', '0030', '0000', '0096', '0000', '27000', '4500', '115', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10444', '10420', '0051', 'ElementalAuraMetal', '0', '0', '1', '0000', '0004', '0037', '50', '0000', '0100', '1000000', '0030', '0000', '0096', '0000', '0', '0000', '120', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10445', '10421', '0051', 'ElementalAuraWood1', '0', '0', '1', '0000', '0000', '0031', '30', '0000', '0100', '1000000', '0030', '0000', '0098', '0000', '5400', '0900', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10446', '10421', '0051', 'ElementalAuraWood1', '0', '0', '1', '0000', '0001', '0032', '35', '0000', '0100', '1000000', '0030', '0000', '0098', '0000', '12000', '2000', '105', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10447', '10421', '0051', 'ElementalAuraWood1', '0', '0', '1', '0000', '0002', '0034', '40', '0000', '0100', '1000000', '0030', '0000', '0098', '0000', '16500', '2750', '110', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10448', '10421', '0051', 'ElementalAuraWood1', '0', '0', '1', '0000', '0003', '0035', '45', '0000', '0100', '1000000', '0030', '0000', '0098', '0000', '27000', '4500', '115', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10449', '10421', '0051', 'ElementalAuraWood1', '0', '0', '1', '0000', '0004', '0037', '50', '0000', '0100', '1000000', '0030', '0000', '0098', '0000', '0', '0000', '120', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10450', '10422', '0051', 'ElementalAuraWater', '0', '0', '1', '0000', '0000', '0031', '30', '0000', '0100', '1000000', '0030', '0000', '0100', '0000', '5400', '0900', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10451', '10422', '0051', 'ElementalAuraWater', '0', '0', '1', '0000', '0001', '0032', '35', '0000', '0100', '1000000', '0030', '0000', '0100', '0000', '12000', '2000', '105', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10452', '10422', '0051', 'ElementalAuraWater', '0', '0', '1', '0000', '0002', '0034', '40', '0000', '0100', '1000000', '0030', '0000', '0100', '0000', '16500', '2750', '110', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10453', '10422', '0051', 'ElementalAuraWater', '0', '0', '1', '0000', '0003', '0035', '45', '0000', '0100', '1000000', '0030', '0000', '0100', '0000', '27000', '4500', '115', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10454', '10422', '0051', 'ElementalAuraWater', '0', '0', '1', '0000', '0004', '0037', '50', '0000', '0100', '1000000', '0030', '0000', '0100', '0000', '0', '0000', '120', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10455', '10423', '0051', 'ElementalAuraFire1', '0', '0', '1', '0000', '0000', '0031', '30', '0000', '0100', '1000000', '0030', '0000', '0102', '0000', '5400', '0900', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10456', '10423', '0051', 'ElementalAuraFire1', '0', '0', '1', '0000', '0001', '0032', '35', '0000', '0100', '1000000', '0030', '0000', '0102', '0000', '12000', '2000', '105', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10457', '10423', '0051', 'ElementalAuraFire1', '0', '0', '1', '0000', '0002', '0034', '40', '0000', '0100', '1000000', '0030', '0000', '0102', '0000', '16500', '2750', '110', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10458', '10423', '0051', 'ElementalAuraFire1', '0', '0', '1', '0000', '0003', '0035', '45', '0000', '0100', '1000000', '0030', '0000', '0102', '0000', '27000', '4500', '115', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10459', '10423', '0051', 'ElementalAuraFire1', '0', '0', '1', '0000', '0004', '0037', '50', '0000', '0100', '1000000', '0030', '0000', '0102', '0000', '0', '0000', '120', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10460', '10424', '0051', 'ElementalAuraEarth', '0', '0', '1', '0000', '0000', '0031', '30', '0000', '0100', '1000000', '0030', '0000', '0104', '0000', '5400', '0900', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10461', '10424', '0051', 'ElementalAuraEarth', '0', '0', '1', '0000', '0001', '0032', '35', '0000', '0100', '1000000', '0030', '0000', '0104', '0000', '12000', '2000', '105', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10462', '10424', '0051', 'ElementalAuraEarth', '0', '0', '1', '0000', '0002', '0034', '40', '0000', '0100', '1000000', '0030', '0000', '0104', '0000', '16500', '2750', '110', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10463', '10424', '0051', 'ElementalAuraEarth', '0', '0', '1', '0000', '0003', '0035', '45', '0000', '0100', '1000000', '0030', '0000', '0104', '0000', '27000', '4500', '115', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10464', '10424', '0051', 'ElementalAuraEarth', '0', '0', '1', '0000', '0004', '0037', '50', '0000', '0100', '1000000', '0030', '0000', '0104', '0000', '0', '0000', '120', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '100', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10425', '10425', '0047', 'Tranquility', '0', '0', '0', '0000', '0000', '0035', '0', '0000', '0100', '0002', '0000', '0020', '0000', '0000', '0', '0000', '70', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '25', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10390', '10390', '0053', 'Oblivion', '0', '0', '0', '0000', '0000', '0000', '33', '0000', '0100', '0030', '0000', '0000', '0002', '0000', '0', '0000', '15', '0001', '0000', '0', '0000', '0', '0000', '0', '0000', '0', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10430', '10430', '0050', 'Compassion', '0', '0', '1', '0002', '0000', '0051', '0', '0000', '0100', '0000', '0020', '0020', '0000', '0000', '0', '0000', '100', '0000', '0000', '0', '0000', '0', '0000', '0', '0000', '75', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10490', '10490', '0055', 'TripleAttack1', '0', '0', '1', '0008', '0000', '0000', '0', '0000', '0040', '1000000', '0030', '0000', '0000', '0000', '5400', '0900', '5', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '0', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10491', '10490', '0055', 'TripleAttack1', '0', '0', '1', '0008', '0001', '0000', '0', '0000', '0044', '1000000', '0030', '0000', '0000', '0000', '12000', '2000', '40', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '0', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10492', '10490', '0055', 'TripleAttack1', '0', '0', '1', '0008', '0002', '0000', '0', '0000', '0048', '1000000', '0030', '0000', '0000', '0000', '16500', '2750', '50', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '0', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10493', '10490', '0055', 'TripleAttack1', '0', '0', '1', '0008', '0003', '0000', '0', '0000', '0052', '1000000', '0030', '0000', '0000', '0000', '27000', '4500', '60', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '0', '0000', '0000', '0000', '0001');
INSERT INTO `cq_magictype` VALUES ('10494', '10490', '0055', 'TripleAttack1', '0', '0', '1', '0008', '0004', '0000', '0', '0000', '0055', '1000000', '0030', '0000', '0000', '0000', '0', '0000', '70', '0000', '0610', '0', '0000', '0', '0000', '0', '0000', '0', '0000', '0000', '0000', '0001');


thats the magictype i add that and works fine i just remove some of it that I did not code..... about soul shackle i really like to know about that how to code... anyway Im learning a little.