Joshua Posted May 19, 2010 Author Share Posted May 19, 2010 Oddly enough the above script worked perfect for me i tested...and i extracted the sqls as is..so i dno what the err is Quote Link to comment Share on other sites More sharing options...
bladewolf2010 Posted May 19, 2010 Share Posted May 19, 2010 can you help me do it then? Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted May 19, 2010 Share Posted May 19, 2010 go to phpmyadmin look at the items table. count how many fields is in items table now look at your insert where does it not match up? Quote Link to comment Share on other sites More sharing options...
bladewolf2010 Posted May 19, 2010 Share Posted May 19, 2010 What? Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted May 19, 2010 Share Posted May 19, 2010 Perhaps if you do not have a clue what I just said then you should go learn before trying to run a game. http://www.phpmyadmin.net http://www.php.net http://www.mysql.com 1 Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted May 20, 2010 Share Posted May 20, 2010 Looks to me bladewolf you didnt either add the correct SQLS or something in your staffitem page is wrong in the queries. Quote Link to comment Share on other sites More sharing options...
bladewolf2010 Posted May 21, 2010 Share Posted May 21, 2010 I added it like posted :/ Quote Link to comment Share on other sites More sharing options...
Agon Posted May 23, 2010 Share Posted May 23, 2010 My players are loving this mod! Thanks once again! Quote Link to comment Share on other sites More sharing options...
Agon Posted May 23, 2010 Share Posted May 23, 2010 Hospital Reason when losing. I'm trying to add hospreason for when the attacker loses against a defender. I'm doing something wrong. Error Message is this: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''hospreason' = 'Lost to TestPlayer', WHERE (`userid`=1)' at line 1" Here's the code I'm trying: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Having trouble figuring out what I'm doing wrong here. Quote Link to comment Share on other sites More sharing options...
Joshua Posted May 23, 2010 Author Share Posted May 23, 2010 'hospreason' should be `hospreason` it's a column not a string ;-) Quote Link to comment Share on other sites More sharing options...
Agon Posted May 24, 2010 Share Posted May 24, 2010 DOH!!!! I need new glasses! Thanks for the help Joshua. Quote Link to comment Share on other sites More sharing options...
Renkia Posted May 24, 2010 Share Posted May 24, 2010 Brilliant work Joshua! As always, you blast me away with your mile long modifications. Keep the work up. :) Quote Link to comment Share on other sites More sharing options...
MDK666 Posted May 25, 2010 Share Posted May 25, 2010 wow someone finally found a use for my inventory mod, congrats im glad to see it went somewhere instead of just being usless so congrats. Quote Link to comment Share on other sites More sharing options...
Joshua Posted May 25, 2010 Author Share Posted May 25, 2010 Yep :) Figured why let it go to waste ;) Makes it more interesting anywho. Quote Link to comment Share on other sites More sharing options...
MDK666 Posted June 1, 2010 Share Posted June 1, 2010 well for a small hint on people that are having errors in staff_items.php items table, and users table dont remove the armor from either of them.... Overwrite inventory with this one. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And overwrite staff_items.php with this one.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. now everyone shouldnt be getting any errors with the script if you are let me know what errors and ill try and help to my best of abilitys Quote Link to comment Share on other sites More sharing options...
Joshua Posted June 1, 2010 Author Share Posted June 1, 2010 Did I forget to delete the "armor" query into the database? I will go look at my online copy and compare.. Being as the attack script doesnt use equip_armor I found it null and void, thought i removed all the sql bits but perhaps i missed one Quote Link to comment Share on other sites More sharing options...
MDK666 Posted June 2, 2010 Share Posted June 2, 2010 it might of worked for you but i had to play with the scripts awhile as i was getting the same errors everyone else was getting so i just left the armor rows in the 2 tables which removed most of the errors other then the create items which was picking up special, ring, and etc and gave a error there so i went through the staff_items and inventory and fixed the few errors i did recieve, as of right now the mod is working great since i fixed the errors so im not sure where they were comming from untill i do find out i just suggest everyone to leave the equip_armor in the tables till these errors are sorted out. Quote Link to comment Share on other sites More sharing options...
Joshua Posted June 2, 2010 Author Share Posted June 2, 2010 Eh i'll go over it tomorrow. It's probably i didnt change a query or two when it calls to the original table, or i added on an extra '' row that isnt there anymore. Either way, i'll fix it up Quote Link to comment Share on other sites More sharing options...
MDK666 Posted June 2, 2010 Share Posted June 2, 2010 ok well make sure to look at my drop-down menu that i just released, you might like it or find something else to use it for or even make it better so i hope u enjoy it... Quote Link to comment Share on other sites More sharing options...
Joshua Posted June 2, 2010 Author Share Posted June 2, 2010 Will do :D Quote Link to comment Share on other sites More sharing options...
Agon Posted June 23, 2010 Share Posted June 23, 2010 Ok. I found a small bug I'm trying to figure out how to fix. I'm getting a printed output like this when I win a fight: "You are in a fight with BuckShotBot. You hit BuckShotBot for 315 damage using your Axe Handle and their Shotgun." Actually, it's my shotgun. And I'd think even though I won, they should be doing some sort of damage to me. I'm pretty sure the error is in here, but not exactly sure how to fix this, as I am novice level, and this is beyond my grasp: Begins around line 190 for most folks. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Been trying to figure it out on my own for quite a while now. Time to ask for help over here. Thanks! Quote Link to comment Share on other sites More sharing options...
Agon Posted June 23, 2010 Share Posted June 23, 2010 Kinda a challenge. Too much for me to handle. But I'd like to challenge those of you with advanced ability to get this mod working great. Things to consider: 1. Compatible with battle bots.(should be pretty easy, I'm working on this one)(Times owned not counting) 2. Compatible with the free ammunition mod. (this one is kinda difficult with a one click attack) 3. Attack outcomes (I think I got this one figured out) 4. An explanation of how to adjust or take into consideration all stats in a fight. I see strength, guard, and agility. But maybe also consider IQ, will, and brave. 5. Battle Stats I know this is all time consuming. Doing my best to pitch in and participate. This is already a great mod, but could become a very very great mod. And I am also happy it is available to the public and free. Also, I'd like to share my version with different attack outcomes. It's compatible with the free attack outcomes mod out there. attack.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Joshua Posted June 24, 2010 Author Share Posted June 24, 2010 Not a bad few ideas there agon. I got bored awhile back and noticed there were NO 1 click attacks for McCodes that were worth a flip so i grabbed the GRPG and modified/added to it to make it work with McC. Then i got carried away and added the extra item slots into the equation for a bit more fun If i get some spare time I may just add what you suggested :) Glad you enjoy Quote Link to comment Share on other sites More sharing options...
savage129 Posted June 30, 2010 Share Posted June 30, 2010 error i think im the only one getting this error because it hasnt been posted yet but i didnt edit anything in the code. i get this error when i try to make a new item QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',17,'test','test',1,1,1, '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', 0, 0, 10000, 0, 0, 0) this is my new_item_submit function function new_item_submit() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. > Back"; $h->endpage(); exit; } $itmname=$db->escape($_POST['itmname']); $itmdesc=$db->escape($_POST['itmdesc']); $weapon=abs((int) $_POST['weapon']); $helmet=abs((int) $_POST['helmet']); $boots=abs((int) $_POST['boots']); $amulet=abs((int) $_POST['amulet']); $braclet=abs((int) $_POST['braclet']); $ring=abs((int) $_POST['ring']); $special=abs((int) $_POST['special']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $boots, $helmet, $amulet, $braclet, $ring)"); print "The {$_POST['itmname']} Item was added to the game."; stafflog_add("Created item {$_POST['itmname']}"); } and i dont know if this is needed but this is my sql dump for the items table, maybe its missing something that i cant figure out CREATE TABLE IF NOT EXISTS `items` ( `itmid` int(11) NOT NULL auto_increment, `itmtype` int(11) NOT NULL default '0', `itmname` varchar(255) NOT NULL default '', `itmdesc` text NOT NULL, `itmbuyprice` int(11) NOT NULL default '0', `itmsellprice` int(11) NOT NULL default '0', `itmbuyable` int(11) NOT NULL default '0', `effect1_on` tinyint(4) NOT NULL default '0', `effect1` text NOT NULL, `effect2_on` tinyint(4) NOT NULL default '0', `effect2` text NOT NULL, `effect3_on` tinyint(4) NOT NULL default '0', `effect3` text NOT NULL, `weapon` int(11) NOT NULL default '0', `itmpic` varchar(255) NOT NULL, `boots` int(11) NOT NULL default '0', `helmet` int(11) NOT NULL default '0', `breastplate` int(11) NOT NULL default '0', `leggings` int(11) NOT NULL default '0', `gloves` int(11) NOT NULL default '0', PRIMARY KEY (`itmid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=99 ; Quote Link to comment Share on other sites More sharing options...
savage129 Posted July 2, 2010 Share Posted July 2, 2010 i found the problem. i had an extra table in there somewhere. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.