Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] type array problem?

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 12th Jan 2021 00:20 Edited at: 12th Jan 2021 08:15
This post has been marked by the post author as the answer.
I have a problem with type arrays atm and i cant see it any suggestions would be great thanks
EDITED Fixed it
main.c


inventorySystem.agc (would like to keep same types)

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Jan 2021 00:53
I think the problem is you are using zero as an indicator of a failed lookup/search.
That causes a problem because arrays start at 0 so it will return zero for a failed lookup and zero when it finds the first element
It might be better to use -1 as a failed status

Login to post a reply

Server time is: 2024-04-25 17:51:25
Your offset time is: 2024-04-25 17:51:25