[Help] i cant wield a weapon i made

02/06/2009 23:32 ph03nixx#1
ok so i made a weapon a swrod with katana looks :P but when i put it on the console says this :
Code:
System.NullReferenceExeption: Object reference not set to an instance of an object. at COServer_Project.Character.GetEquipStat<Byte pos, boolean UnEquip>in C:/Program Files/sources/LOTF Based Source/COserverProject/Character.cs:line 4830
at COserver_Project.Client.GetPacket<Byte [] data> in C:/Program Files/sources/LOTF Base Source/COserverProject/CLient.cs:line 10763
System.NullRefrenceException: Object Refrence Not set to an instance of an object.
see the attachments below it will show the wielding problem.

can someone help me???:???:
02/06/2009 23:37 damianpesta#2
I think its not telling server pos for The new Equipment?... Maybe im wrong.
02/06/2009 23:41 © Haydz#3
What does line 10763 Contain?... By the looks of it its trying to load the items stats from your database but it cant find it.
02/06/2009 23:43 ph03nixx#4
wait ill post the screenie of the console [Only registered and activated users can see links. Click Here To Register...]


Thts the error
02/06/2009 23:47 damianpesta#5
Probably Stats as hans said.It clearly states That its unable to Get the byte to Position ( Space that waepon goes int0) so the problem is in Stats or Database.Check it all over again.
02/06/2009 23:51 © Haydz#6
Yeah its failing to load the items stats from the DB... Or in simpler terms, you need to add the items stats.
02/06/2009 23:52 ph03nixx#7
well in Client.cs line 10763 it says this: if (MyChar.ItemsInInventory < 40)
Character.cs line 4830 says : GetEquipStats(ToPos, false);
should i change GetEquipStats(ToPos, false); into GetEquipStats(ToPos, true);

??
02/06/2009 23:53 ph03nixx#8
Quote:
Originally Posted by © Haydz View Post
Yeah its failing to load the items stats from the DB... Or in simpler terms, you need to add the items stats.
oh i forgot that.... where are the item stats again:P i forgot
02/06/2009 23:53 damianpesta#9
Quote:
Originally Posted by ph03nixx View Post
well in Client.cs line 10763 it says this: if (MyChar.ItemsInInventory < 40)
Character.cs line 4830 says : GetEquipStats(ToPos, false);
should i change GetEquipStats(ToPos, false); into GetEquipStats(ToPos, true);

??
you should make sure that You got Item in database, with right stats and Prop's.And check all over again.The error is on item stats.

Edit , they are in Database.
02/06/2009 23:54 ph03nixx#10
databse.cs or external database?
02/06/2009 23:58 damianpesta#11
Quote:
Originally Posted by ph03nixx View Post
databse.cs or external database?
sql database....
02/07/2009 00:04 ph03nixx#12
k, well i got it and there is notihing wrong i only got how much i can sell it for at armorer and how much CPS it worth and the ID and name, so whats wrong?
02/07/2009 00:36 damianpesta#13
Quote:
Originally Posted by ph03nixx View Post
k, well i got it and there is notihing wrong i only got how much i can sell it for at armorer and how much CPS it worth and the ID and name, so whats wrong?
Does Stat required? ... And stuff Level required... and others fill em In and shud work.
02/07/2009 00:46 ph03nixx#14
i use navicat but here this is what it looks like with me: [Only registered and activated users can see links. Click Here To Register...]
02/07/2009 00:49 TasteofChaos#15
Quote:
Originally Posted by ph03nixx View Post
k, well i got it and there is notihing wrong i only got how much i can sell it for at armorer and how much CPS it worth and the ID and name, so whats wrong?



Field Type Collation Attributes Null Default Extra Action
ItemID int(10) UNSIGNED No auto_increment
ItemName varchar(45) latin1_swedish_ci No
ClassReq int(16) UNSIGNED No
ProfReq int(16) UNSIGNED No
LvlReq int(16) UNSIGNED No
SexReq int(16) UNSIGNED No
StrReq int(16) UNSIGNED No
AgiReq int(16) UNSIGNED No
Worth int(16) UNSIGNED No
MinAtk int(16) UNSIGNED No
MaxAtk int(16) UNSIGNED No
Defense int(16) UNSIGNED Yes NULL
MDef int(16) UNSIGNED No
MAttack int(16) UNSIGNED No
Dodge int(16) UNSIGNED No
AgiGive int(16) UNSIGNED No
CPsWorth int(16) UNSIGNED No

if you use phpmyadmin, this is what it should look similiar to..
just browse all the files and insert a new one at the end of all the items.
make sure they correspond to your newly created item (wepID, etc.)