Magictallguy Posted November 9, 2013 Author Share Posted November 9, 2013 I'm sure I included the query update. ah well, original code updated :) Quote Link to comment Share on other sites More sharing options...
dnenb Posted November 9, 2013 Share Posted November 9, 2013 Thanks! A couple of other things: - When gangs are created, data needs to be put into gang_settings, right? I entered it manually for a gang to try it now. Do I need data anywhere else? - I'm getting a Unable to jump to row 0 on MySQL result index 17 error when going to yourgang.php?action=viewarmoury after donating an item. Not sure what's causing it yet, but I'm looking at it. Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted November 9, 2013 Author Share Posted November 9, 2013 (edited) When gangs are created, then gangs are created lol The settings will automatically insert themselves once the gang leader has set them (might make it a requirement to set them first), then it'll just update instead. Did you receive that error *after* running through the settings, or before? Update The option to make setting up the armoury a requirement has been added Edited November 9, 2013 by Magictallguy Added update Quote Link to comment Share on other sites More sharing options...
dnenb Posted November 9, 2013 Share Posted November 9, 2013 Then that's the problem: gang_staff_edit_armoury_settings() just sends me back to "yourgang.php?action=staff&act2=editarm%20%20oury" without putting anything into the table. When I manually inserted settings for a gang, and then donated an item, I got that "unable to jump to row"-error on viewarmoury. Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted November 9, 2013 Share Posted November 9, 2013 Hmm I didn't get that error above when I installed it :-/ wen I click change settings I just pressed change and it inserted it into the tables with no problems Any idea when the ability for leaders to withdraw from the armoury and for the weapons to be taken off the user when the gang is deleted or destroyed? Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted November 10, 2013 Author Share Posted November 10, 2013 Then that's the problem: gang_staff_edit_armoury_settings() just sends me back to "yourgang.php?action=staff&act2=editarm%20%20oury" without putting anything into the table. When I manually inserted settings for a gang, and then donated an item, I got that "unable to jump to row"-error on viewarmoury. That's because that's not the right link. Blame MWG's syntax highlighter.. I do.. You can find a copy of this on my site (link is in my signature) Quote Link to comment Share on other sites More sharing options...
dnenb Posted November 12, 2013 Share Posted November 12, 2013 Alright, got that settings part right after renaming the field in gang_settings from "armoury_is_closed" to "armoury_is_open". But the other issue still stands. I get this: Unable to jump to row 0 on MySQL result index 17 (2) when trying to view yourgang.php?action=viewarmoury after donating an item. If I delete the item from the db then the page loads as normal and shows "There are no items available in the Armoury". Quote Link to comment Share on other sites More sharing options...
Djkanna Posted November 12, 2013 Share Posted November 12, 2013 Alright, got that settings part right after renaming the field in gang_settings from "armoury_is_closed" to "armoury_is_open". But the other issue still stands. I get this: when trying to view yourgang.php?action=viewarmoury after donating an item. If I delete the item from the db then the page loads as normal and shows "There are no items available in the Armoury". Try replacing your gang_view_armoury function with: this Quote Link to comment Share on other sites More sharing options...
dnenb Posted November 12, 2013 Share Posted November 12, 2013 Thanks, that took care of the formatting! Looks like I'm way too tired to do this right now, but: any idea why I'm getting the same error in gang_borrow_item()? Quote Link to comment Share on other sites More sharing options...
Djkanna Posted November 12, 2013 Share Posted November 12, 2013 Thanks, that took care of the formatting! Looks like I'm way too tired to do this right now, but: any idea why I'm getting the same error in gang_borrow_item()? No problem, try replacing your gang_borrow_item function with: this Quote Link to comment Share on other sites More sharing options...
dnenb Posted November 14, 2013 Share Posted November 14, 2013 Thanks, that got it working:) A few things I've done: - added `inv_borrowed` to the query in inventory that lists your items so that the test if($i['inv_borrowed'] == 'Yes') works. - added a link in inventory so that you can return a borrowed item (also added `inv_itemid` to the same query as above): 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...
dnenb Posted November 15, 2013 Share Posted November 15, 2013 Ok so I'm a few steps further. What I've done since last post: - You should keep this line as is in equip_weapon.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and not change is as you've said in the first post. - The $_GET['type'] you use in equip_weapon and equip_armor should be $_POST['type']. - This line must not be removed from unequip.php as you've suggested: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. But now I got a little stuck on itemsell.php, as I'm not able to sell any items at all. You've said this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. but is that right? Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted November 16, 2013 Author Share Posted November 16, 2013 (edited) Ok so I'm a few steps further. What I've done since last post: - You should keep this line as is in equip_weapon.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and not change is as you've said in the first post. - The $_GET['type'] you use in equip_weapon and equip_armor should be $_POST['type']. - This line must not be removed from unequip.php as you've suggested: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. But now I got a little stuck on itemsell.php, as I'm not able to sell any items at all. You've said this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. but is that right? Thank you for pointing those out, my own fault for rushing! Original code updated I'm having a look at my local copy of the item*.php and everything appears to be working fine. Let me just compare version ;) -- UPDATE See original code. Everything should be fine Edited November 16, 2013 by Magictallguy Quote Link to comment Share on other sites More sharing options...
dnenb Posted November 16, 2013 Share Posted November 16, 2013 Thanks, I'm gonna check it again. Another thing I had to do that I didn't mention was adding a row to gang_settings when a new gang is created (creategang.php). Otherwise you get errors if you try to go to the gang armory before updating the settings. Quote Link to comment Share on other sites More sharing options...
dnenb Posted November 16, 2013 Share Posted November 16, 2013 I was a little confused about this, but got it now: If you own a particular item, you're not able to borrow that item from your gang. If you borrow a particular item, you're not able to buy that item from the shops unless you return the borrowed item to your gang first. I edited the error messages a bit to make this clearer. I still don't understand this in imadd.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This is keeping me from adding an item to the market that I own. What's the point of that line? Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted November 17, 2013 Author Share Posted November 17, 2013 I was a little confused about this, but got it now: If you own a particular item, you're not able to borrow that item from your gang. If you borrow a particular item, you're not able to buy that item from the shops unless you return the borrowed item to your gang first. I edited the error messages a bit to make this clearer. I still don't understand this in imadd.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This is keeping me from adding an item to the market that I own. What's the point of that line? Exactly what it says on the tin. If not rows are found, kill the page cleanly with some message stating that you don't own it. I've just realised I can minify that further.. Original code updated Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted November 17, 2013 Share Posted November 17, 2013 Mtg please please make it so the leader can withdraw the items and for the items to be taken from the user when the gang is destroyed I'm dying to release this but don't want to without the above Also something I believe is wrong with unequip as when I unequip a weapon it duplicates the weapon, so puts the item in my inventory and keeps it equipped And lastly when you say code updated is that on your site as well? Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted November 17, 2013 Author Share Posted November 17, 2013 (edited) Mtg please please make it so the leader can withdraw the items [...1] I'm dying to release this but don't want to without the above [...2] [...3] I'll add that in now [...1] and for the items to be taken from the user when the gang is destroyed Already done :) [...2] Also something I believe is wrong with unequip as when I unequip a weapon it duplicates the weapon, so puts the item in my inventory and keeps it equipped I'll have a look now too :) [...3] And lastly when you say code updated is that on your site as well? Normally within 10 minutes of posting on here :) Edited November 17, 2013 by Magictallguy Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted November 17, 2013 Author Share Posted November 17, 2013 (edited) please make it so the leader can withdraw the items[...] Edit yourgang.php Find: (in the gang_view_armoury() function) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add below: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Find: The ending brace of the gang_staff_armoury_recall_item() function Add below: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Original code updated Edited December 3, 2013 by Magictallguy Code updated for legacy systems Quote Link to comment Share on other sites More sharing options...
dnenb Posted December 1, 2013 Share Posted December 1, 2013 Thanks for the help. The mistake I had earlier in imadd.php was fixed when I edited the query to this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Also, in your last addition with gang_staff_armoury_leader_take_item() you might wanna say `items` as `i` in the query. Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted December 1, 2013 Author Share Posted December 1, 2013 Thanks for the help. The mistake I had earlier in imadd.php was fixed when I edited the query to this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Also, in your last addition with gang_staff_armoury_leader_take_item() you might wanna say `items` as `i` in the query. Done! Thanks for pointing that out :) Quote Link to comment Share on other sites More sharing options...
dnenb Posted December 1, 2013 Share Posted December 1, 2013 Just added this to my live game - so far so good :) Thanks for all the help! Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted December 1, 2013 Author Share Posted December 1, 2013 Just added this to my live game - so far so good :) Thanks for all the help! You're very welcome, and thanks for the tip :D Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted December 3, 2013 Share Posted December 3, 2013 hey MTG, im still having problems with this! When the leader trys to take the item i get this message: QUERY ERROR: Query was empty Query was ive checked and double checked everything is inputted as you have set it to Thanks mate Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted December 3, 2013 Author Share Posted December 3, 2013 hey MTG, im still having problems with this! When the leader trys to take the item i get this message: QUERY ERROR: Query was empty Query was ive checked and double checked everything is inputted as you have set it to Thanks mate Code updated (both the posts on here and my site), try that 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.