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.

Newcomers DBPro Corner / Problem with Array's / UDT

Author
Message
PresFox
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location:
Posted: 27th Oct 2007 01:29 Edited at: 27th Oct 2007 01:31
Hello,

I am having some trouble with the code below. Error returned is:

Could not determine parameter type of 'objects_in_game(y).model_name' at line 162.

code:


Error is returned by Synergy, on compiling

Microsoft isnt evil, they just make really crappy operating systems -- Linus torvalds
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Oct 2007 01:41
Hmm, not too sure, but usually if I make an array of size 0 and loop through it, I start from index 1. Not sure if that's what's causing the problem though.

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
PresFox
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location:
Posted: 27th Oct 2007 01:52
that isnt causing it, changing it has no effect

Microsoft isnt evil, they just make really crappy operating systems -- Linus torvalds
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Oct 2007 02:14
Are you calling the function before the array is created by any chance?

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
PresFox
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location:
Posted: 27th Oct 2007 10:39
no, array is created on top of the code, and im not even calling the function yet, im just trying to compile my code

Microsoft isnt evil, they just make really crappy operating systems -- Linus torvalds
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 27th Oct 2007 10:54
The error is that you've declared y as a double integer in the function declaration and your for loop's iterator uses y too, you can only access array elements in DBP using integers or dwords.

PresFox
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location:
Posted: 27th Oct 2007 11:42
Thanks DC, that was it

Microsoft isnt evil, they just make really crappy operating systems -- Linus torvalds

Login to post a reply

Server time is: 2024-09-27 08:30:08
Your offset time is: 2024-09-27 08:30:08