Getting name of array
#7

Yes, you're completely right, I want the MAX_INVENTORY index, in a loop, name. However I just tried the code and still returns the same error(no idea why tbh) // Accessing element at index 15 past array upper bound 14


One thing I did not mention was that I'm formatting a string like "Itemname: %s, ID(%d)",blabla,balbal);
But all of these things register in the dialog I want to get(ID, durability of item etc), except for the itemname, when I tried before to get the itemname of invslots[playerid][MAX_INVENTORY] it did not show with similar run time errors.
What I mean by did not show, the dialog just doesn't show with similar errors of Array Index Out Of Bounds,



I was able to get itemnames in SCM and dialogs when not in a loop with the function below, but directly when looped, it did not work. I used this function for that btw. So what appears with this function is that it doesn't work in loops at all. And same thing with the code you sent above, gives me the same errors as well. // upper 15 blabla


Stock:
Код:
stock GetItemName(id, name[], len) return format(name, len, "%s", itemname[id]);

Error:
[/code]
Accessing element at index 15 past array upper bound 14
[code]

I'll send you the entire code in a minute in PM so you can look at it.
Reply


Messages In This Thread
Getting name of array - by RollingFlow - 07.03.2014, 14:48
Re: Getting name of array - by Konstantinos - 07.03.2014, 14:54
Re: Getting name of array - by RollingFlow - 07.03.2014, 15:14
Re: Getting name of array - by Konstantinos - 07.03.2014, 15:22
Re: Getting name of array - by RollingFlow - 07.03.2014, 15:24
Re: Getting name of array - by Konstantinos - 07.03.2014, 15:33
Re: Getting name of array - by RollingFlow - 07.03.2014, 15:56

Forum Jump:


Users browsing this thread: 1 Guest(s)