items.php

General Chat, Comments

items.php

Postby KyleMassacre » Wed Nov 16, 2016 9:30 am

Just a bug fix I noticed. In items.php you need to change the GetObjectInfo method on the last SQL query from where object_types_attributes.id = ? to where object_types_attributes.object_type = ?
Skype: KyleMassacre
My NWE Modules
User avatar
KyleMassacre
 
Posts: 557
Joined: Wed Nov 27, 2013 7:42 am
Has thanked: 19 times
Been thanked: 35 times

Re: items.php

Postby KyleMassacre » Wed Nov 16, 2016 11:27 am

I would just like to add why. I guess I forgot to mention what it does/doesn't do for you.

If you keep it stock and you just run the SQL as is and just replace the ? with an actual value, say for example a weapon it should return the attribute for Damage. Buuuuuut, if you change it to the way I described it would bring up attributes for Damage, Dexterity, and Energy Cost.

Obviously this is just a little bug in the source code but a bug that ultimately limits what you can do with objects in the game since you can't use custom attribute types for objects
Skype: KyleMassacre
My NWE Modules
User avatar
KyleMassacre
 
Posts: 557
Joined: Wed Nov 27, 2013 7:42 am
Has thanked: 19 times
Been thanked: 35 times

Re: items.php

Postby a_bertrand » Wed Nov 16, 2016 1:46 pm

Nice finding Kyle!
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
a_bertrand
New Worlds Engine creator
 
Posts: 1514
Joined: Mon Feb 25, 2013 8:46 am
Has thanked: 15 times
Been thanked: 23 times

Re: items.php

Postby KyleMassacre » Wed Nov 16, 2016 1:48 pm

a_bertrand wrote:Nice finding Kyle!

Thank you haha. I am building something and for the longest time I couldn't figure out why it wouldn't work.
Skype: KyleMassacre
My NWE Modules
User avatar
KyleMassacre
 
Posts: 557
Joined: Wed Nov 27, 2013 7:42 am
Has thanked: 19 times
Been thanked: 35 times

Re: items.php

Postby cbsarge » Mon Nov 21, 2016 9:05 pm

Are you working on NWE again Kyle?
User avatar
cbsarge
 
Posts: 184
Joined: Mon Sep 14, 2015 10:20 am
Has thanked: 44 times
Been thanked: 1 time

Re: items.php

Postby hallsofvallhalla » Mon Nov 21, 2016 9:38 pm

There is some great news coming for NWE this week....
User avatar
hallsofvallhalla
Site Admin
 
Posts: 11887
Images: 13
Joined: Wed Apr 22, 2009 6:29 pm
Location: mobile, al
Has thanked: 11 times
Been thanked: 147 times
Blog: View Blog (3)

Re: items.php

Postby KyleMassacre » Mon Nov 21, 2016 9:42 pm

cbsarge wrote:Are you working on NWE again Kyle?

Yes and No. I am currently not 3rd party supporting it. But that doesn't mean I am not working on it for myself ;)
Skype: KyleMassacre
My NWE Modules
User avatar
KyleMassacre
 
Posts: 557
Joined: Wed Nov 27, 2013 7:42 am
Has thanked: 19 times
Been thanked: 35 times


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x