Pages: 1
Author Topic: ds_list_ functions  (44,749 Views)
Offline (Unknown gender) score_under

Member
Joined: Aug 2008
Posts: 308
View profile
Posted on: October 22, 2008, 06:10:50 PM
ds_list_size(), along with the rest of them, results in a syntax error for me, saying that the function does not exist (with latest build from time of writing).
Since it's marked as finished, what's the problem with it?

(Enigma also reports that I have an unknown D&D action while every object has only code actions. ::) )

I also spotted this little gem while trying to work my way through the source code...
   char ordinal=(char) enigma::negmod(val,255);
Surely that can just be...
   char ordinal=(char)val; //val&0xFF is implied, as char is only 1 byte.
And thinking over that again, why do you have a function called "negmod", instead of just x%y ?
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #1 Posted on: October 23, 2008, 12:27:33 AM
ds_list is finished, just not in the release apparently.
negmod is so mod functions the way it does in GM, it's different.
Offline (Unknown gender) score_under

Member
Joined: Aug 2008
Posts: 308
View profile
Reply #2 Posted on: October 26, 2008, 03:13:39 PM
Quote from: Rusky on October 23, 2008, 12:27:33 AM
ds_list is finished, just not in the release apparently.
negmod is so mod functions the way it does in GM, it's different.
Does the C++ compiler try to take it into its own hands and do something like double->int conversion beforehand?

Anyway, which D&D action is this mysterious thing which LGM shows nothing of?

(PS. If the ds_list_xxxx functions are stable, could I please have a .diff or similar format patch file?)
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #3 Posted on: November 16, 2008, 02:07:47 PM
ds_list was done by Rusky. I have still yet to implement it, or test it for myself.

negmod was a general replacement for % after I discovered % didn't take doubles, and had trouble with negatives or something.

Either way, it's basically just (char) & 0xFF now.
Pages: 1