|
You last visited: Today at 10:38
Advertisement
[HELP] Speedgun Weapon Skill Error
Discussion on [HELP] Speedgun Weapon Skill Error within the CO2 Private Server forum part of the Conquer Online 2 category.
09/04/2008, 22:13
|
#1
|
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
|
[HELP] Speedgun Weapon Skill Error
After careful testing, I've determined the what causes the error to occur. I just haven't the slightest clue how to fix it.
Action that causes the error:
Quote:
|
Attempting to attack with Spear while using Skill Speedgun
|
Problem (in-game):
Quote:
|
When the player uses spear, the attack is fine. When the add the skill SpeedGun, they can no longer attack the monster, and the server throws the error below:
|
Error:
Code:
System.NullReferenceException: Object reference not set to an instance of an object.
at COServer_Project.Character.WeaponSkill() in C:Conquer BeyondCOBeyond SourceCharacter.cs:line 2849
at COServer_Project.Character.Attack() in C:Conquer BeyondCOBeyond SourceCharacter.cs:line 3250
Character.cs Statement 1:
Code:
else if (WepType == 560 && !Use)
{
if (TargetUID != 0)
if (Skills.Contains((short)1260))
{
byte SkillLvl = (byte)Skills[(short)1260];
byte Chance = (byte)DataBase.SkillAttributes[(int)1260][(int)SkillLvl][5];
if (Other.ChanceSuccess(Chance))
{
UseSkill(1260, 0, 0, TargetUID);
Use = true;
}
}
}
Line 2849:
Code:
if (Skills.Contains((short)1260))
Character.cs Statement 2:
Code:
public void Attack()
{
LastAttack = DateTime.Now;
if (!Alive)
{
MobTarget = null;
SkillLoopingTarget = 0;
TGTarget = null;
PTarget = null;
return;
}
Ready = false;
try
{
if (AtkType == 25 || AtkType == 2)
{
if (!WeaponSkill())
{
if (MobTarget != null)
{
if (MobTarget.Alive)
if (MobTarget.Map == LocMap)
if (MyMath.PointDistance(LocX, LocY, MobTarget.PosX, MobTarget.PosY) < 6 || AtkType == 25)
{
if (!SMOn && !AccuracyOn)
{
if (!Other.ChanceSuccess(RealAgi / 2 + Math.Abs((110 - Level) / 2)))
{
MissAttack(MobTarget);
return;
}
}
else if (SMOn)
{
if (!Other.ChanceSuccess(RealAgi + Math.Abs((110 - Level) / 2)))
{
MissAttack(MobTarget);
return;
}
}
else
{
if (!Other.ChanceSuccess(RealAgi * 1.2 + Math.Abs((110 - Level) / 2)))
{
MissAttack(MobTarget);
return;
}
}
Line 3250:
Code:
if (!WeaponSkill())
This is the only weapon skill I've had any errors with. All others were tested and proved working.
|
|
|
09/04/2008, 22:28
|
#2
|
elite*gold: 0
Join Date: Jun 2007
Posts: 323
Received Thanks: 30
|
Replace the first thing with this
Code:
else if (WepType == 560 && !Use)
{
if (Skills.Contains((short)1260))
{
byte SkillLvl = (byte)Skills[(short)1260];
byte Chance = (byte)DataBase.SkillAttributes[(int)1260][(int)SkillLvl][5];
if (Other.ChanceSuccess(Chance))
{
UseSkill(1260, 0, 0, 0);
Use = true;
}
}
}
|
|
|
09/04/2008, 22:57
|
#3
|
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
|
Quote:
Originally Posted by Zanzibar
Replace the first thing with this
Code:
else if (WepType == 560 && !Use)
{
if (Skills.Contains((short)1260))
{
byte SkillLvl = (byte)Skills[(short)1260];
byte Chance = (byte)DataBase.SkillAttributes[(int)1260][(int)SkillLvl][5];
if (Other.ChanceSuccess(Chance))
{
UseSkill(1260, 0, 0, 0);
Use = true;
}
}
}
|
Thanks for the reply, unfortunately, this didn't fix the error.
|
|
|
09/04/2008, 23:01
|
#4
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
the "Skills" variable is null.
|
|
|
09/04/2008, 23:05
|
#5
|
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
|
Quote:
Originally Posted by InfamousNoone
the "Skills" variable is null.
|
I thought about that, but if that was it, then why do all the other weapon skills work. I used the same code for all of them.
|
|
|
09/05/2008, 01:39
|
#6
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by taguro
I thought about that, but if that was it, then why do all the other weapon skills work. I used the same code for all of them.
|
You don't understand, the variable IS null. Otherwise you wouldn't be getting that error. I will look at it in a minute... Are you sure that 1260 is the speedgun ID?
|
|
|
09/05/2008, 09:40
|
#7
|
elite*gold: 111
Join Date: Feb 2008
Posts: 2,161
Received Thanks: 646
|
Quote:
Originally Posted by tao4229
You don't understand, the variable IS null. Otherwise you wouldn't be getting that error. I will look at it in a minute... Are you sure that 1260 is the speedgun ID?
|
Yep 1260 is the speedgun id
i have a list of pretty much all
if u go a bit down in tht guide ull see all skills well allmost all
|
|
|
09/05/2008, 12:48
|
#8
|
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
|
U have to code it too in the DataBase.cs!
|
|
|
09/05/2008, 15:36
|
#9
|
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
|
Quote:
Originally Posted by YukiXian
U have to code it too in the DataBase.cs!
|
lol, i know it has to be coded in the database.cs.... and it is. here is my issue, the coding is the exact same for EVERY 2-handed weapon skill. all other skills work besides this ONE. Any more ideas?
|
|
|
09/06/2008, 04:52
|
#10
|
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
|
NVM error solved: Thanks for all your posts and replies.
|
|
|
09/06/2008, 05:31
|
#11
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by taguro
NVM error solved: Thanks for all your posts and replies.
|
Just out of curiosity, what was the problem, and how did you solve it?(Just incase I run into this later =o)
|
|
|
09/06/2008, 08:30
|
#12
|
elite*gold: 0
Join Date: Jun 2007
Posts: 387
Received Thanks: 64
|
Quote:
Originally Posted by tao4229
Just out of curiosity, what was the problem, and how did you solve it?(Just incase I run into this later =o)
|
When I was writing the Database.cs file, I was quickly copying and pasting the codes I was using for the other weapon skills. I just forgot to change the last code to 1260(the skill id for the spear.)
Quote:
|
U have to code it too in the DataBase.cs!
|
Thanks goes to YukiXian for pointing out the Database.cs and to Kinshi who help me out the most with this error.
|
|
|
09/06/2008, 16:14
|
#13
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by taguro
When I was writing the Database.cs file, I was quickly copying and pasting the codes I was using for the other weapon skills. I just forgot to change the last code to 1260(the skill id for the spear.)
Thanks goes to YukiXian for pointing out the Database.cs and to Kinshi who help me out the most with this error.
|
Ahh, I see.
I could totally see myself doing that D=
|
|
|
09/06/2008, 21:53
|
#14
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
Quote:
Originally Posted by tao4229
Ahh, I see.
I could totally see myself doing that D=
|
Lol... everyone makes mistakes some BIG ones some LIL ones... Who cares^^
|
|
|
 |
Similar Threads
|
Weapon Skill Bug, Help me!!
06/21/2009 - CO2 Private Server - 1 Replies
On my binary 5065 server i was changing percent rates of magictype and logged on things worked fine but i noticed that if you buy a skill such as rage u can learn it before u have ur weapon skill to the requirement. Then when you go to attack with the weapon it uses the skill every single time and people cant level tehre weapon prof. What could be the problem. If you know more information please reply back.
|
All weapon skill up!
12/29/2008 - WoW Exploits, Hacks, Tools & Macros - 14 Replies
Scourge Event, Argent Dawn is everywhere.
The Argent Dawn NPCs are level 10. As Level 70 youll get them down very quick. But wait - they wont die! And since theyre doing Level 10 damage you can easily bringt up your weapon skills.
Alliance:
Look for Lieutenant Orrin. Open your reputation tab, look for Argent Dawn and check "At war".
|
Low Lvl EZ Weapon Skill Ups
02/03/2007 - WoW Exploits, Hacks, Tools & Macros - 2 Replies
There is a nice mob in eversong woods (just south of silvermoon city) for when you need to lvl up a new weapon, like when you're lvl 20. Useful for BE paladins especially for when you get your new polearm. Basically, it's a lvl 6 Plaguebone Pillager that has an instant respawn. You just stand in one spot and repeatedly right click until your weapon is at the skill lvl you want. He wanders so you might have to kill a few to figure out which one it is, but his respawn point is 50,57 in the middle...
|
All times are GMT +1. The time now is 10:39.
|
|