emir143
(emir143)
April 23, 2023, 4:11pm
1
hello
so im trying to make a inventory in c++, and i have referenced userwidget in the details panel and, just as i though i was gonna get this to work, when i run my code. it gives me a lot of error
this is what i have coded, idk if the toggleInventory is bad coded. how can i improve or solve this
these are the error im getting.
Hexavx
(Hexavx)
April 23, 2023, 4:56pm
2
make sure INVENTORYCPPCharacter.cpp
has #include
that contain UTest
and WidgetClass
is not null
if u did, the crashes could be somewhere in UTest
tyconner
(Ty Conner)
April 23, 2023, 4:57pm
3
the error is telling you that what you are trying to AddToViewport() is a null/invalid reference which is causing your crash.
emir143
(emir143)
April 23, 2023, 5:28pm
4
ok so i have choosen an UI for the widgetclass, it kind of works but the UI doesnt show up, only the debug log
emir143
(emir143)
April 23, 2023, 5:30pm
5
just by interest also might be blind but how do you know that? does it say it in the error?
tyconner
(Ty Conner)
April 23, 2023, 5:32pm
6
EXCEPTION ACCESS VIOLATION is the first giveaway, this is usually an invalid reference. Next giveaway is memory address is 0x000000000 etc
emir143
(emir143)
April 23, 2023, 5:35pm
7
ahha i see, makes pretty much sense with the 0’s, thank you for explaining
1 Like