Jump to content
MakeWebGames

Recommended Posts

Posted

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.
Posted (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 by Magictallguy
Added update
Posted

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.

Posted

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?

Posted
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)

Posted

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".

Posted
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

Posted

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()?

Posted
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

Posted

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.

Posted

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?

Posted (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 by Magictallguy
Posted

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.

Posted

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?

Posted
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

Posted

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?

Posted (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 by Magictallguy
Posted (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 by Magictallguy
Code updated for legacy systems
  • 2 weeks later...
Posted

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.

Posted
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 :)

Posted

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

Posted
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...