theFarWilds.com http://thefarwilds.com/forum/ | |
Need Some Help? http://thefarwilds.com/forum/viewtopic.php?f=14&t=1801 |
Page 1 of 1 |
Author: | Zblader [ Thu Apr 01, 2010 8:51 pm ] |
Post subject: | Need Some Help? |
Creating this topic for those of you who need help but can't get any noticable stuff done about it (or don't want to ask the same people over and over). You never know . Likewise, I'll start with a script I'm having trouble with. {Script,Rebeling Scroundrels!,110} Error: Only objects have constructors. But why? http://thefarwilds.com/story/view.php?sid=110 that's the public script i've put up for anyone to analyze. |
Author: | Altren [ Thu Apr 01, 2010 9:57 pm ] |
Post subject: | Re: Need Some Help? |
look at Code: int rand(11); I know what you wanted to do, but rand can't be variable and function name at same time, you should write Code: int randomInteger = rand(11); , so you declare new variable called randomInteger and assign some value to it. Also note that error message show line number where you have error.
|
Author: | queeshai [ Thu Apr 01, 2010 10:17 pm ] |
Post subject: | Re: Need Some Help? |
http://thefarwilds.com/story/view.php?sid=111 ignore the parts that are commented out ... they are implicit suggestions for Jed. |
Author: | Zblader [ Fri Apr 02, 2010 12:43 am ] |
Post subject: | Re: Need Some Help? |
Arigato guys! Now, I wonder who will post their problem next? @queeshai: you'll need to leave that up for a while, I'm not really in the position to be proggraming at the moment. Edit: Also @ Queeshai: you were beggining to stray off of what I was tryign to do. The Rebellious Serfs are a separate AI faction with no deck or flux, they're just angry serfs. The other two players battle with both each other and the Rebellious Serfs. Thanks for the help, you can take example 001 down now ^^. |
Author: | jed [ Fri Apr 02, 2010 2:56 am ] |
Post subject: | Re: Need Some Help? |
queeshai: yeah no #defines. It is just AngelScript so you are limited to what they give you. also rather than: // should add locations to an array and check to ensure no duplication you could just check the return of: createEntity( "Rebellious Serfs", el, p ); and if it doesn't make an entity then loop an extra time. //char* cardName = "Rebellious Serfs"; should be: string cardName = "Rebellious Serfs"; |
Author: | queeshai [ Fri Apr 02, 2010 6:00 am ] |
Post subject: | Re: Need Some Help? |
ahh, thanks. I apparently didn't read the scripting wiki close enough earlier -- I see that you mention AngelScript there, too. I made the changes you suggested. not sure what the difference between e.isValid() and e.doesExist() is ... but both either seems effective for my needs. I added a new set of comments to the script. most importantly, I'd like to see more public methods. if this is of interest to you, I would encourage other folks with coding experience to suggest other methods that would be helpful, especially to less experienced coders. |
Author: | jed [ Fri Apr 02, 2010 11:06 am ] |
Post subject: | Re: Need Some Help? |
queeshai thanks for the feedback from another programmer. // jed: this should be made more clear via enums or the like // jed: why is this a global function? setTerrain( el, 3, 2 ); Of course I'd rather them be enums but I didn't see a good way to add enums in AngelScript. You want it to be a method of Location instead? Yeah I'll add more convenience functions like Player.removeDeck() later. I just wanted to get the basics in there first. |
Author: | jed [ Fri Apr 02, 2010 12:55 pm ] |
Post subject: | Re: Need Some Help? |
Actually nm I see how to make enums. I'll add that. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |