0 votes

my code looks like this for the itemlist : ("inventory" being the itemlist)

if inventory.is_selected(i) and inventory.get_item_metadata(i).size() == 10: #
    highest_value_dice = inventory.get_item_metadata(i)[2]
    lowest_value_dice = inventory.get_item_metadata(i)[1]
    attack_range = inventory.get_item_metadata(i)[9]
    now_wielding = inventory.get_item_text(i)

This is under the "on_ItemLis_item_activated" func and everything works great.
Here is the issue:
http://prntscr.com/e925ve - once items have been picked up the scroll appears as it should
http://prntscr.com/e926l3 - doubble tapping then "activates" the item and inventory.ensure_current_is_visible() runs. The scroll also moves but the items stand still.
http://prntscr.com/e92638 - clicking once more on the item will give the result I was looking for, where the full item name and icon are revealed and the scroll appears to work.

Hope this makes sense, It seems like a bug or something of the like, so I probably won't need this to work "better", but thought I'd show it anyway in case it is a bug :)

Have a nice day

in Engine by (34 points)
edited by

ERROR: Vector::operator []: Condition ' p_index<0 || p_index>=size() ' is true. returned: aux
At: c:\projects\godot-builds\godot\core\vector.h:132

I also just got this error in the CMD that opens with Godot. It happens when I remove the final item in the itemlist, which apparently crashes the game. Sometimes the semifinal item does it aswell. Weird :)

1 Answer

0 votes

If you know this is a bug, please don't use QA to report it. You should post this in a place where developers will see it, here: https://github.com/godotengine/godot/issues

by (27,831 points)

I am unsure if it is supposed to be like that or a bug, I'm still sorta new, so didn't want to waste dev time. But I'll post it there right away!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.