#then how would it know what to put in
1 messages · Page 1 of 1 (latest)
Are u calling that function?
everything else works?
yes
this is the most recent edition
i feel like its something small and dumb im missing
Would u mind posting the whole code?
just cant find it
It normally is
U look like u know what ur doing ur prolly missing one small thing
U just need someone else to look at it
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I have a few holes in my C# education
i know more about unity than actual coding rules
no worries thank you
it looks like ur missing a reference to ItemSO
ok its nested so lemme so
wait a second
ur assigning it in that class
not the class thats calling for it
can you explain
waitttt
i seeeee
thats referencing the class variable
i need to make an instance variable
yeah
yeah its very nested
what does that mean
Like classes depending on classes u should try implementing interfaces
for me it makes things more readable
and easy to understand (usually)
but what are interfaces?
yeah but u run into small things like this that catch u off guard
interfaces are contracts that say a class must have this and they are easy to work with its prolly to late to implement them now but basically it says "ANYTHING THAT HAS THIS INTERFACE HAS THIS IN IT" so if something is a item it can have a class with a ITEMINTERFACE that way it can say like its touchable or can put in ur inventory and u can just check for that
its better explained else where lol
ill check it out
also i believe line 35 and 37 can be put into on if statement
however i still dont know how to fix this
is it still giving u a error?
i gotchu bro no worries
thanks
lemme read it over again
line 90
U should prolly have an Array have ItemSO[] for each slot
that would be better
ItemSO = hotbar.right.itemslot
yeah?
):
assign in the if statement on line 90
it looks like u did it backwards on line 102
i may be wrong hold on
i think it because
is itemInSlot assigned in the hotbar class?
im sorry if im repeating myself its alot of jumping around
this is confusing
interfaces will make ur life easier lol
or a abstract class
ur a good programmer its spaghetti rn tho
ur actually really good its just how u decided to make classes my friend
yeah learn about inherentice or however u spell it
okay
@digital heath okay i know that its bad to use Chat.GBT
but this was too cool
it perfectly described what my script does and found the error
before you hang me i know the dangers of chat GBT and im not using it to learn
this however did not help
but i have a new idea
I WAS TRYING TO ASSSIGN THE ITEM IN THE ITEM SLOT
BUT THERE WAS NO ITEM SLOIT!!!
AHHHHHHHHHHHHH
i fixed with SO's
spent WAYYY too long on that
It happens man lol
Sorry 4 the late response was with my gf and hey you made a slot array nice !!!!
If you need help with anything please lmk bro
Is this ur first game or?