Re: [Audyssey] Python 2.7
OK this topic will continue in audiogames.net forum where I ask various questions On 2/20/16, jacob Kruger wrote: > Like said, have no experience using power shell at all - maybe ask > mainstream pythonista's? > > All I've ever had to do was edit the main/normal path system environment > variable. > > Jacob Kruger > Blind Biker > Skype: BlindZA > "Roger Wilco wants to welcome you...to the space janitor's closet..." > > On 2016-02-20 5:51 AM, ishan dhami wrote: >> Hi Jacob I am now totally confused whether I have changed the value of >> power shell path or another. >> Well there are two path variable one is for power shell which have the >> %root sets of value >> one another has some website path I think >> Which one I have to edit? >> Thanks >> Ishan >> >> On 2/19/16, jacob Kruger wrote: >>> Think they want you to add that set of values to path environment >>> variable, making sure they're also separated from prior entries by a ; >>> character. >>> >>> And, I only worry about the actual path to python.exe itself, when >>> working with python 2.7. >>> >>> Jacob Kruger >>> Blind Biker >>> Skype: BlindZA >>> "Roger Wilco wants to welcome you...to the space janitor's closet..." >>> >>> On 2016-02-19 5:05 AM, ishan dhami wrote: Hi Jacob Have you looked at my varriable value? I just want to confirm that if it is right then why Python gives me the standard error. Please tell me whether I have to edit the value of power shell varriable. I have pasted the varriable value Thanks Ishan On 2/18/16, jacob Kruger wrote: > You don't want to change any of the others, but, just make sure > c:\python27 is included either at the end, or in the beginning, > separated from other values using the ; character. > > Stay well > > Jacob Kruger > Blind Biker > Skype: BlindZA > "Roger Wilco wants to welcome you...to the space janitor's closet..." > > On 2016-02-18 1:17 PM, ishan dhami wrote: >> Hi Jacob according to the book The varriable should Like that >> %SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Python27 >> ( >> Is this right or Should I change other varriable's value >> Thanks >> Ishan >> >> On 2/18/16, jacob Kruger wrote: >>> What's currently in your path environment variable? >>> >>> Jacob Kruger >>> Blind Biker >>> Skype: BlindZA >>> "Roger Wilco wants to welcome you...to the space janitor's >>> closet..." >>> >>> On 2016-02-18 12:35 PM, ishan dhami wrote: Hi Jacob Yes this error is coming whenever I open Python from command line Please guide me how to solve that Thanks Ishan On 2/18/16, jacob Kruger wrote: > Do you get the standard error message if you just type in python > from > command line? > > 'python' is not recognized as an internal or external command, > operable program or batch file. > > If you just type in path at command line, and hit enter, it should > print > out the whole value, with each piece separated by ; characters - > maybe > just double check that it's right..? > > Jacob Kruger > Blind Biker > Skype: BlindZA > "Roger Wilco wants to welcome you...to the space janitor's > closet..." > > On 2016-02-18 11:31 AM, ishan dhami wrote: >> Hi programmers! >> I am just stuck in Python 2.7 >> I am reading a bite of Python by Swaroop >> It is a great book indeed. >> So My question is that After the value has changed of environment >> variable then why I am not able to open Python from the command >> line >> However I write print " hello world" and it will give me output >> so >> please tell me that what I am doing wrong? >> Thanks >> >> Ishan >> >> --- >> Gamers mailing list __ Gamers@audyssey.org >> If you want to leave the list, send E-mail to >> gamers-unsubscr...@audyssey.org. >> You can make changes or update your subscription via the web, at >> http://audyssey.org/mailman/listinfo/gamers_audyssey.org. >> All messages are archived and can be searched and read at >> http://www.mail-archive.com/gamers@audyssey.org. >> If you have any questions or concerns regarding the management of >> the >> list, >> please send E-mail to gamers-ow...@audyssey.org. >> >> > --- > Gamers mailing list __ Gamers@audyssey.org > If you want to leave the list, send E-mail to > gamers-unsubscr...@audyssey.org. > You can make changes or update your subscription via the web, at > http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
Re: [Audyssey] Python 2.7
Like said, have no experience using power shell at all - maybe ask mainstream pythonista's? All I've ever had to do was edit the main/normal path system environment variable. Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." On 2016-02-20 5:51 AM, ishan dhami wrote: Hi Jacob I am now totally confused whether I have changed the value of power shell path or another. Well there are two path variable one is for power shell which have the %root sets of value one another has some website path I think Which one I have to edit? Thanks Ishan On 2/19/16, jacob Kruger wrote: Think they want you to add that set of values to path environment variable, making sure they're also separated from prior entries by a ; character. And, I only worry about the actual path to python.exe itself, when working with python 2.7. Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." On 2016-02-19 5:05 AM, ishan dhami wrote: Hi Jacob Have you looked at my varriable value? I just want to confirm that if it is right then why Python gives me the standard error. Please tell me whether I have to edit the value of power shell varriable. I have pasted the varriable value Thanks Ishan On 2/18/16, jacob Kruger wrote: You don't want to change any of the others, but, just make sure c:\python27 is included either at the end, or in the beginning, separated from other values using the ; character. Stay well Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." On 2016-02-18 1:17 PM, ishan dhami wrote: Hi Jacob according to the book The varriable should Like that %SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Python27 ( Is this right or Should I change other varriable's value Thanks Ishan On 2/18/16, jacob Kruger wrote: What's currently in your path environment variable? Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." On 2016-02-18 12:35 PM, ishan dhami wrote: Hi Jacob Yes this error is coming whenever I open Python from command line Please guide me how to solve that Thanks Ishan On 2/18/16, jacob Kruger wrote: Do you get the standard error message if you just type in python from command line? 'python' is not recognized as an internal or external command, operable program or batch file. If you just type in path at command line, and hit enter, it should print out the whole value, with each piece separated by ; characters - maybe just double check that it's right..? Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." On 2016-02-18 11:31 AM, ishan dhami wrote: Hi programmers! I am just stuck in Python 2.7 I am reading a bite of Python by Swaroop It is a great book indeed. So My question is that After the value has changed of environment variable then why I am not able to open Python from the command line However I write print " hello world" and it will give me output so please tell me that what I am doing wrong? Thanks Ishan --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org. --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org. --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org. --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you
Re: [Audyssey] Python 2.7
Hi Jacob I am now totally confused whether I have changed the value of power shell path or another. Well there are two path variable one is for power shell which have the %root sets of value one another has some website path I think Which one I have to edit? Thanks Ishan On 2/19/16, jacob Kruger wrote: > Think they want you to add that set of values to path environment > variable, making sure they're also separated from prior entries by a ; > character. > > And, I only worry about the actual path to python.exe itself, when > working with python 2.7. > > Jacob Kruger > Blind Biker > Skype: BlindZA > "Roger Wilco wants to welcome you...to the space janitor's closet..." > > On 2016-02-19 5:05 AM, ishan dhami wrote: >> Hi Jacob >> Have you looked at my varriable value? >> I just want to confirm that if it is right then why Python gives me >> the standard error. >> Please tell me whether I have to edit the value of power shell varriable. >> I have pasted the varriable value >> Thanks >> Ishan >> >> On 2/18/16, jacob Kruger wrote: >>> You don't want to change any of the others, but, just make sure >>> c:\python27 is included either at the end, or in the beginning, >>> separated from other values using the ; character. >>> >>> Stay well >>> >>> Jacob Kruger >>> Blind Biker >>> Skype: BlindZA >>> "Roger Wilco wants to welcome you...to the space janitor's closet..." >>> >>> On 2016-02-18 1:17 PM, ishan dhami wrote: Hi Jacob according to the book The varriable should Like that %SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Python27 ( Is this right or Should I change other varriable's value Thanks Ishan On 2/18/16, jacob Kruger wrote: > What's currently in your path environment variable? > > Jacob Kruger > Blind Biker > Skype: BlindZA > "Roger Wilco wants to welcome you...to the space janitor's closet..." > > On 2016-02-18 12:35 PM, ishan dhami wrote: >> Hi Jacob Yes this error is coming whenever I open Python from command >> line >> Please guide me how to solve that >> Thanks >> Ishan >> >> On 2/18/16, jacob Kruger wrote: >>> Do you get the standard error message if you just type in python >>> from >>> command line? >>> >>> 'python' is not recognized as an internal or external command, >>> operable program or batch file. >>> >>> If you just type in path at command line, and hit enter, it should >>> print >>> out the whole value, with each piece separated by ; characters - >>> maybe >>> just double check that it's right..? >>> >>> Jacob Kruger >>> Blind Biker >>> Skype: BlindZA >>> "Roger Wilco wants to welcome you...to the space janitor's >>> closet..." >>> >>> On 2016-02-18 11:31 AM, ishan dhami wrote: Hi programmers! I am just stuck in Python 2.7 I am reading a bite of Python by Swaroop It is a great book indeed. So My question is that After the value has changed of environment variable then why I am not able to open Python from the command line However I write print " hello world" and it will give me output so please tell me that what I am doing wrong? Thanks Ishan --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org. >>> --- >>> Gamers mailing list __ Gamers@audyssey.org >>> If you want to leave the list, send E-mail to >>> gamers-unsubscr...@audyssey.org. >>> You can make changes or update your subscription via the web, at >>> http://audyssey.org/mailman/listinfo/gamers_audyssey.org. >>> All messages are archived and can be searched and read at >>> http://www.mail-archive.com/gamers@audyssey.org. >>> If you have any questions or concerns regarding the management of >>> the >>> list, >>> please send E-mail to gamers-ow...@audyssey.org. >>> >> --- >> Gamers mailing list __ Gamers@audyssey.org >> If you want to leave the list, send E-mail to >> gamers-unsubscr...@audyssey.org. >> You can make changes or update your subscription via the web, at >> http://audyssey.org/mailman/listinfo/gamers_audyssey.org. >> All messages are archived and can be searched and read at >> http://www.mail-archive.com/gamers@audyssey.org. >> If you have any questions or concerns regard
Re: [Audyssey] another new exciting game from kidfriendly software is out blindfold roadtrip
This game is basically the same as "1,000 miles" that is played on RS Games. It is a lot of fun and doesn't take long to play. If you think you're finished, you! really! are! finished!! -Original Message- From: joseph weakland Sent: Friday, February 19, 2016 2:34 PM To: 'audyssey games' Subject: [Audyssey] another new exciting game from kidfriendly software is out blindfold roadtrip Hello all gamers. Below is the app store link to a groovy game that just came out this morning in IOS app store called blindfold roadtrip app store link https://itunes.apple.com/us/app/blindfold-road-trip/id1080225770?mt=8 description Blindfold Road Trip is an fully accessible audio card game where you try to to be the first player to travel 1000 miles. You and a computer opponent are given a handful of cards. Your turn begins by drawing a card from the deck, and then either playing the card, or discarding the card. The objective of the game is to play distance cards, such as 100 miles, so that you travel a total of 1000 miles. You also want to prevent your opponent from playing distance cards, by stopping him by damaging his car, or slowing him down. Your opponent will try to do the same to you. Both of you can play cards to fix damage caused by your opponent. Blindfold Road Trip was suggested by several blind gamers who enjoyed Blindfold Horse Race and Blindfold Gin Rummy. If you have any queries for marty Shultz email him at ma...@kidfriendlysoftware.com he's always glad to receive feedback/ideasJ enjoy! --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org. --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org.
Re: [Audyssey] AudioQuake
I used lots of quake maps i found somewhere, don't remember where, with little difficulty. I would suggest that there's no way to know without playing around with it. On 2/18/16, Tobias Vinteus wrote: > How much luck have people been having with the regular Quake levels and > expansion packs? > > Also, when trying out previous versions of Audioquake, I experienced > crashes when restoring saved games. Is this situation better now witht he > newer builds? > > > On Wed, 17 Feb 2016, Dakotah Rickard wrote: > >> Hi everyone. >> I recently found the new, better way to play AudioQuake, the newer >> version that's a zipped archive. >> The difficulty is this. It don't understand how to add and play mods. >> I changed the qmod to a zip and extracted it into its own sub >> directory of the audioquake directory, but I don't know how to make it >> play from within the launcher, and I don't know if I'm doing it all >> the steps. >> Hope for the help. >> >> -- >> Signed: >> Dakotah Rickard >> >> --- >> Gamers mailing list __ Gamers@audyssey.org >> If you want to leave the list, send E-mail to >> gamers-unsubscr...@audyssey.org. >> You can make changes or update your subscription via the web, at >> http://audyssey.org/mailman/listinfo/gamers_audyssey.org. >> All messages are archived and can be searched and read at >> http://www.mail-archive.com/gamers@audyssey.org. >> If you have any questions or concerns regarding the management of the >> list, >> please send E-mail to gamers-ow...@audyssey.org. >> > > --- > Gamers mailing list __ Gamers@audyssey.org > If you want to leave the list, send E-mail to > gamers-unsubscr...@audyssey.org. > You can make changes or update your subscription via the web, at > http://audyssey.org/mailman/listinfo/gamers_audyssey.org. > All messages are archived and can be searched and read at > http://www.mail-archive.com/gamers@audyssey.org. > If you have any questions or concerns regarding the management of the list, > please send E-mail to gamers-ow...@audyssey.org. > -- Signed: Dakotah Rickard --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org.
[Audyssey] another new exciting game from kidfriendly software is out blindfold roadtrip
Hello all gamers. Below is the app store link to a groovy game that just came out this morning in IOS app store called blindfold roadtrip app store link https://itunes.apple.com/us/app/blindfold-road-trip/id1080225770?mt=8 description Blindfold Road Trip is an fully accessible audio card game where you try to to be the first player to travel 1000 miles. You and a computer opponent are given a handful of cards. Your turn begins by drawing a card from the deck, and then either playing the card, or discarding the card. The objective of the game is to play distance cards, such as 100 miles, so that you travel a total of 1000 miles. You also want to prevent your opponent from playing distance cards, by stopping him by damaging his car, or slowing him down. Your opponent will try to do the same to you. Both of you can play cards to fix damage caused by your opponent. Blindfold Road Trip was suggested by several blind gamers who enjoyed Blindfold Horse Race and Blindfold Gin Rummy. If you have any queries for marty Shultz email him at ma...@kidfriendlysoftware.com he's always glad to receive feedback/ideasJ enjoy! --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org.
Re: [Audyssey] bgt operator overloading question
Hi, I don't really like to do code handouts. It isn't conducive to good learning. Still, I'm vaguely interested in this since I myself have not ever sorted strings alphabetically, so I will write something up here. This implementation may have errors. I tested it on six items with various first letters and it worked great, but I may have not accounted for some edge cases, who knows. Here is the opCmp method you should use. int opCmp(players_items@ other) { // Lowercase both strings so that uppercase lettered items do not appear before lowercased ones. string other_name=string_to_lower_case(other.name); string original_name=string_to_lower_case(name); // Now simply do comparisons as we would do on ints. Keep in mind this deceptively simple action will take much longer than integer comparison. if(original_name>other_name) return 1; else if(original_name wrote: > Hi Aaron, > > Thanks for the reply that makes sense. Sorry to be a pain I'm still not > 100% > sure though how I'd add that into my code so that I could get opCmp to > sort the array of class's alphabetically by name. could I ask for an > example using the below script how you'd add that in there to sort the > array? > > > > class players_items > { > string name; > players_items(string name) > { > this.name = name; > } > } > > players_items@[] inventory; > > > many thanks > > > -Original Message- > From: Gamers [mailto:gamers-boun...@audyssey.org] On Behalf Of Aaron Baker > Sent: Friday, February 19, 2016 12:52 AM > To: Gamers Discussion list > Subject: Re: [Audyssey] bgt operator overloading question > > opCmp wants you to return a positive number if the source object is > greater than the parameter passed, 0 if they are equal, and -1 if the > source object is less than the parameter. > You can use the less than and greater than operator on strings, so the > rest should be obvious. One not so obvious complication is that this > sort technique is case sensative, so make sure to unify the case by > either uppercasing or lowercasing all characters. > Best, > Aaron > > On 2/18/16, Paul Lemm wrote: >> Hi Aaron and John, >> >> This is something that has had me stuck for a while now. As in a game I >> have written, I have created a class, and then created an aray of that >> class, but want to sort the array so it is alphabetical. I've read the >> help topic on sorting arrays which makes sense for sorting an array of >> strings , but I don't understand how I would get it to sort an array of >> classes. The BGT help document just says you need to overload the >> comparison >> operator. I've always been a little unclear on overloading operators >> and >> not sure how I would go about overloading the comparison operator in my >> class. So using the basic class code below how would I go about > overloading >> the comparison operator and then sorting the array of that class >> alphabetically by name? >> >> class players_items >> { >> string name; >> string description; >> bool key_item; >> players_items(string name, string description, bool key_item) >> { >> this.name = name; >> this.description = description; >> this.key_item = key_item; >> } >> } >> >> >> Players_items[] inventory; >> >> Many thanks for any help you can offer >> >> Paul >> >> >> >> >> >> >> -Original Message- >> From: Gamers [mailto:gamers-boun...@audyssey.org] On Behalf Of Aaron >> Baker >> Sent: Thursday, February 18, 2016 1:20 PM >> To: Gamers Discussion list >> Subject: Re: [Audyssey] bgt operator overloading question >> >> Hello, >> Did you actually try it? I know that that can make the difference >> between runtime error and no runtime error. I thought it was kind of >> odd too, but it is usually bad practice to pass an object by value >> anyway. If you're worried about the object changing, you might be able >> to write it as "const stat@ other". >> I really think that is the problem. >> This code gives me a runtime error: >> " >> class stat >> { >> int percent; >> int opCmp(stat other) >> { >> return percent-other.percent; >> } >> } >> stat[] stats; >> void main() >> { >> stats.sort_descending(); >> } >> " >> >> And this code doesn't: >> " >> class stat >> { >> int percent; >> int opCmp(stat@ other) >> { >> return percent-other.percent; >> } >> } >> stat[] stats; >> void main() >> { >> stats.sort_descending(); >> } >> " >> Best, >> Aaron >> >> On 2/18/16, john wrote: >>> Seems to be a nogo. >>> I'd be surprised if that was the issue; handles are close enough to >> objects >>> >>> for it to not matter as function parameters in my experience. >>> >>> -- >>> From: "Aaron Baker" >>> Sent: Wednesday, February 17, 2016 19:51 >>> To: "Gamers Discussion list" >>> Subject: Re: [Audyssey] bgt operator overloading question >>> >>> Hey John, >>> Try switching your parameter from "stat other" to "stat@ other". >>> I think opCmp wants a handle (by reference), not a by value object. >>> Best, >>> Aaron >>> >>> On 2
Re: [Audyssey] bgt operator overloading question
Hi Aaron, Thanks for the reply that makes sense. Sorry to be a pain I'm still not 100% sure though how I'd add that into my code so that I could get opCmp to sort the array of class's alphabetically by name. could I ask for an example using the below script how you'd add that in there to sort the array? class players_items { string name; players_items(string name) { this.name = name; } } players_items@[] inventory; many thanks -Original Message- From: Gamers [mailto:gamers-boun...@audyssey.org] On Behalf Of Aaron Baker Sent: Friday, February 19, 2016 12:52 AM To: Gamers Discussion list Subject: Re: [Audyssey] bgt operator overloading question opCmp wants you to return a positive number if the source object is greater than the parameter passed, 0 if they are equal, and -1 if the source object is less than the parameter. You can use the less than and greater than operator on strings, so the rest should be obvious. One not so obvious complication is that this sort technique is case sensative, so make sure to unify the case by either uppercasing or lowercasing all characters. Best, Aaron On 2/18/16, Paul Lemm wrote: > Hi Aaron and John, > > This is something that has had me stuck for a while now. As in a game I > have written, I have created a class, and then created an aray of that > class, but want to sort the array so it is alphabetical. I've read the > help topic on sorting arrays which makes sense for sorting an array of > strings , but I don't understand how I would get it to sort an array of > classes. The BGT help document just says you need to overload the > comparison > operator. I've always been a little unclear on overloading operators and > not sure how I would go about overloading the comparison operator in my > class. So using the basic class code below how would I go about overloading > the comparison operator and then sorting the array of that class > alphabetically by name? > > class players_items > { > string name; > string description; > bool key_item; > players_items(string name, string description, bool key_item) > { > this.name = name; > this.description = description; > this.key_item = key_item; > } > } > > > Players_items[] inventory; > > Many thanks for any help you can offer > > Paul > > > > > > > -Original Message- > From: Gamers [mailto:gamers-boun...@audyssey.org] On Behalf Of Aaron Baker > Sent: Thursday, February 18, 2016 1:20 PM > To: Gamers Discussion list > Subject: Re: [Audyssey] bgt operator overloading question > > Hello, > Did you actually try it? I know that that can make the difference > between runtime error and no runtime error. I thought it was kind of > odd too, but it is usually bad practice to pass an object by value > anyway. If you're worried about the object changing, you might be able > to write it as "const stat@ other". > I really think that is the problem. > This code gives me a runtime error: > " > class stat > { > int percent; > int opCmp(stat other) > { > return percent-other.percent; > } > } > stat[] stats; > void main() > { > stats.sort_descending(); > } > " > > And this code doesn't: > " > class stat > { > int percent; > int opCmp(stat@ other) > { > return percent-other.percent; > } > } > stat[] stats; > void main() > { > stats.sort_descending(); > } > " > Best, > Aaron > > On 2/18/16, john wrote: >> Seems to be a nogo. >> I'd be surprised if that was the issue; handles are close enough to > objects >> >> for it to not matter as function parameters in my experience. >> >> -- >> From: "Aaron Baker" >> Sent: Wednesday, February 17, 2016 19:51 >> To: "Gamers Discussion list" >> Subject: Re: [Audyssey] bgt operator overloading question >> >> Hey John, >> Try switching your parameter from "stat other" to "stat@ other". >> I think opCmp wants a handle (by reference), not a by value object. >> Best, >> Aaron >> >> On 2/17/16, john wrote: >>> Hi all, >>> I'm attempting to overload comparison operators in order to sort an >>> array >>> >>> of >>> objects, with the following function: >>> //begin code >>> int opCmp (stat other) >>> { >>> return percent-other.percent; >>> } >>> //end code >>> However, the program gives me the following error as soon as comparison >>> takes place: >>> A runtime error occurred. File:function: void main()Description: Type >>> 'stat' >>> does not have a matching opCmp method >>> >>> >>> >>> Can anybody shed some light on this one? >>> >>> >>> >>> Thanks, >>> >>> John >>> >>> >>> >>> P.S: >>> >>> Yes, the comparison function is within the stat class, and comparison is >>> being done by array.sort_descending. >>> >>> I have tried several case changes to the function name, and have stuck >>> with >>> the above because it matches both the manual and compiler error. >>> --- >>> Gamers mailing list __ Gamers@audyssey.org >>> If you want to leave the list, send E-mail to >>> gamers-unsubscr...@audyssey.org. >>> You can make changes or upd