Posts: 1,767
Threads: 124
Joined: Mar 2010
17.12.2013, 13:02
(
Last edited by Riddick94; 18/12/2013 at 11:32 AM.
)
- found problem -
Posts: 1,767
Threads: 124
Joined: Mar 2010
Quote:
Originally Posted by Deduction
Would this work?
pawn Code:
AddPlayerItem(playerid, listitem+1);
Under
pawn Code:
case DIALOG_ITEMS: { if(!response)return false; else { AddPlayerItem(playerid, listitem+1); //here } }
|
It won't it's gonna mess the whole thing, when you gonna try to pick up objects in different order than sequence (I mean like, line by line). Maybe there's a way to avoid counting from 1 UID? I need help, damn.
Posts: 2,593
Threads: 34
Joined: Dec 2007
So start from 0 ? xd or use listitem+1 ?
Posts: 1,767
Threads: 124
Joined: Mar 2010
You can't use listitem+1 because, it's messing the whole thing, it doesn't work, I tested it out yesterday already. And how do I count from 0, if it starts from 1. That's the problem. Maybe there's other way to do it, I checked other Inventory systems, but they're working different way.
Posts: 162
Threads: 31
Joined: Feb 2012
Reputation:
0
So your problem here is to do with listitem starting at 0.
And the objects start at 1, so theres no object at 0.
listitem+1 would work here.
Since, if you chose the first list item it would be 0+1=1.
Then second list item would be 1+1=2.
Get what I am saying?
So how it stuffs things up has me completely confused.
Posts: 1,767
Threads: 124
Joined: Mar 2010
Well, imagine like I've got three objects in my GUI and I want to pick up the third one, it's gonna be 3, and you're right, but the previous one, gonna mess up. It's really hard to explain, but what can I say, it doesn't work. Listitem always should start from '0' number. I might do some changes, but I need some ideas, if someone has some. Maybe other way doing it with MySQL support?