I think i have it all covered, but obviously i dont =P
1* I have the structure and values asigned.
2* the DB also have misstext and hittext structure. both on playerweapons and the shop.
3* i also use lowercasings all over the place so i dont have to worry about that.
still i get the error "could not insert the damn weapon into backpack"
what am i missing ???
$playerid = $playerinfo3['id'];
$name = $iteminfo3['name'];
$misstext1 = $iteminfo3['misstext1'];
$misstext2 = $iteminfo3['misstext2'];
$misstext3 = $iteminfo3['misstext3'];
$misstext4 = $iteminfo3['misstext4'];
$hit = $iteminfo3['hit'];
$wlevel = $iteminfo3['level'];
$hittext1 = $iteminfo3['hittext1'];
$hittext2 = $iteminfo3['hittext2'];
$hittext3 = $iteminfo3['hittext3'];
$hittext4 = $iteminfo3['hittext4'];
$damage = $iteminfo3['damage'];
$randid = rand(1000,999999999);
$price = $iteminfo3['price'];
$itembought = "INSERT into playerweapons(pid, name, hit, level, randid, price, misstext1, misstext2, misstext3, misstext4, class, hittext1, hittext2, hittext3, hittext4, damage) VALUES ('$playerid','$name','$hit','$wlevel','$randid','$price','$misstext1','$misstext2','$misstext3','$misstext4','$class','$hittext1','$hittext2','$hittext3','$hittext4','$damage')";
mysql_query($itembought) or die("could not insert the damn weapon into backpack");
cant insert my weapon to player.
Re: cant insert my weapon to player.
Try replace:
with
Code: Select all
or die("could not insert the damn weapon into backpack");
Code: Select all
or die( mysql_error() );
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: cant insert my weapon to player.
TY.
found the problem wich i solved. (was missing a "hit" column in the db at some place)
then another problem came up. wich i also solved. =P
so now iam gonna try and fix yet another one, a bugging damage. i sometime get a negative damage hehehe
"you hit for -3damage" etc. should just be a math problem.
Ohhh that reminds me, i have to try and make a Random Fumbling variable text also, where you might accidentaly damage yourself or someting funny like that
"Game making is like medicin. fix one problem and get two others." haha, just made that up.
found the problem wich i solved. (was missing a "hit" column in the db at some place)
then another problem came up. wich i also solved. =P
so now iam gonna try and fix yet another one, a bugging damage. i sometime get a negative damage hehehe
"you hit for -3damage" etc. should just be a math problem.
Ohhh that reminds me, i have to try and make a Random Fumbling variable text also, where you might accidentaly damage yourself or someting funny like that
"Game making is like medicin. fix one problem and get two others." haha, just made that up.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: cant insert my weapon to player.
love the subject

its called stabbing..cant insert my weapon to player.