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.

DLL Talk / String table indices limited to three digits?

Author
Message
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 27th Feb 2014 17:35
So I just noticed this trying to get a plugin to work with DBPro.
It seems that for any string table entry that has a ID / value beyond 999 the DBPro compiler fails with an "Could not determine parameter type of <function name>" error.
Is there any particular reason to this, seeing to how you should be able to have string table indices up to 65535?
Or am I just doing something wrong...?


"Why do programmers get Halloween and Christmas mixed up?"
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Feb 2014 23:45
You're not doing anything wrong, and yes there is a limit. Is there a reason that you need more than 999 strings?

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 28th Feb 2014 00:55
I might have a valid reason sooner or later, for now I get by with about 550 entries though.
I mainly encountered this problem because I grouped strings on id's divisible by 100 so that I could come back and add in things later without they ending up out of place unless I restructured the whole table for each such insertion.


"Why do programmers get Halloween and Christmas mixed up?"
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 28th Feb 2014 01:13 Edited at: 28th Feb 2014 13:25
Another somewhat related question is this; I'm having trouble filling a DBPro array from a plugin.
From reading through the DarkSDK source on some array functions it seems this approach should be appropriate, yet it seems the array only contains uninitialized heap memory once control gets back to DBPro from the dll:

Any idea on what might cause that? Is there some further things that have to be done in order to write to an array?
The array in question is declared as dim arr(0) as dword from DBPro. After calling the above function, array count reports the appropriate number of elements but trying to read or write to the array causes access violations.

Edit: got it figured out, it seems each array item is actually another pointer to where the actual element data is stored.


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2024-11-21 09:17:46
Your offset time is: 2024-11-21 09:17:46