Instant death nodes
Pages
Author | Topic: Instant death nodes |
---|---|
Canned
Member # 8014
|
written Sunday, January 6 2008 11:48
Profile
I'm still confused. I don't see how i isn't defined. Here is the whole script: Man, the copy and paste thing acts up with Notepad. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Shaper
Member # 3442
|
written Sunday, January 6 2008 12:05
Profile
Homepage
"Defining i" can be said much more clearly by saying "tell BoA that you are going to use a variable called 'i'". So, firstly, I'm assuming you know what a variable is. It's a number (usually) that either changes in value, or that you don't know the value of. Think alegbra in the example I'm about to show you, i = 3. i + 2 = 5. i is the variable, since we didn't know what it was until we did the equation.Now, in order to tell BoA that you are going to use a variable, you have to write it down in the script. So, under the variables; line, you'd write "int i;" (but without the quotation marks). E.g: See? The "int" bit just tells BoA that the variable is an integer, or, basically, a whole number. You can also use the term "short", (by writing "short a;" for example, though I'd just stick to int for now. Hope that's clearer... -------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Canned
Member # 8014
|
written Sunday, January 6 2008 12:19
Profile
Thankyou, that helped. But now it is saying: t3 Error: State not ended properly in line 18. And I don't see any problem at all Here is the script: -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Infiltrator
Member # 5576
|
written Sunday, January 6 2008 12:29
Profile
Homepage
The key word "beginstate" does just what it says and begins a state. Each state must then be ended by using the "break" keyword. Like this: You need one break for every beginstate, and you can't begin another state until you've ended the previous one. -------------------- Überraschung des Dosenöffners! "On guard, you musty sofa!" Posts: 627 | Registered: Monday, March 7 2005 08:00 |
Shaper
Member # 3442
|
written Sunday, January 6 2008 12:30
Profile
Homepage
I see a few errors. 1)The variable needs defining before the "body" bit of the script. It's annoying at first, but you'll get the hang of it. The order is: 2)Both the INIT_STATE and START_STATE need a "break;" command at the end. This is the "state not ended" thing. A "break" call tells BoA you've finished that bit of code. Look: -------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Canned
Member # 8014
|
written Sunday, January 6 2008 12:47
Profile
Thank you, that fixed the problem yet another one came up. t3: Bad expression in line 22 I don't get what a "Bad expression" is. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Shaper
Member # 3442
|
written Sunday, January 6 2008 12:51
Profile
Homepage
A bad expression is a mathematical formula that BoA doesn't like. Usually 'cus you've done something wrong... It's this line: if(get_crime_level(1)>0){i=0 while(i<4{ kill_char(i,3,0); i = i + 1 } }; It should be:It's not necessary to write code out like that, but it helps when starting out because you can see which if calls do what. -------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Canned
Member # 8014
|
written Sunday, January 6 2008 13:00
Profile
I fixed it, but it still says it. And I can't identify what is wrong. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Lifecrafter
Member # 6193
|
written Sunday, January 6 2008 13:06
Profile
Homepage
Technically writing it all as one line is fine (Although it's DEFINITELY not advised) but the real problem is that your while statement doesn't close parentheses. This can be spotted fairly easily if you follow Nikki's advice and split your code into multiple lines, and it's advisable to do so for a myriad of other reasons as well (I started out making the same mistake and writing code as one line like that-- it wasn' pretty. Do yourself a favor and stop right now.) Edit: And you fixed it in that post. The new problem is the final ";" you only use semicolons at the end of a call, not after parenthesis or brackets. [ Sunday, January 06, 2008 13:08: Message edited by: Lazarus. ] -------------------- "NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Shaper
Member # 3442
|
written Sunday, January 6 2008 13:07
Profile
Homepage
[/QB][/QUOTE] Remove my comments, and it should work. -------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Agent
Member # 2759
|
written Sunday, January 6 2008 13:10
Profile
Homepage
... and remove the word "short", in case Nikki didn't make that clear. -------------------- Geneforge 4 stuff. Also, everything I know about Avernum | Avernum 2 | Avernum 3 | Avernum 4 Posts: 1104 | Registered: Monday, March 10 2003 08:00 |
Canned
Member # 8014
|
written Sunday, January 6 2008 13:16
Profile
Edit -Nevermind, fixed. Thank you. [ Sunday, January 06, 2008 13:18: Message edited by: Iffy ] -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Agent
Member # 2759
|
written Sunday, January 6 2008 13:18
Profile
Homepage
You forgot to remove the 1. It should be get_crime_level() -------------------- Geneforge 4 stuff. Also, everything I know about Avernum | Avernum 2 | Avernum 3 | Avernum 4 Posts: 1104 | Registered: Monday, March 10 2003 08:00 |
Shaper
Member # 3442
|
written Sunday, January 6 2008 13:18
Profile
Homepage
quote:A SDF is probably how Jeff did it in A3, I'm guessing; although including an option to take town numbers would be nice, it's not much more work to do it the long way. -------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Canned
Member # 8014
|
written Sunday, January 6 2008 13:32
Profile
Okay, I tried putting a code that creates a dialoge box just before you die, but it didn't work. I tried using the "void message_dialog" call, but I must of not done it right. Where does it go? Is it the right call? -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Agent
Member # 2759
|
written Sunday, January 6 2008 13:37
Profile
Homepage
If you included the word "void", you probably did it wrong. message_dialog("Why not peek at an existing scenario's scripts and copy paste what you need, changing where appropriate?",""); [ Sunday, January 06, 2008 13:38: Message edited by: Micawber ] -------------------- Geneforge 4 stuff. Also, everything I know about Avernum | Avernum 2 | Avernum 3 | Avernum 4 Posts: 1104 | Registered: Monday, March 10 2003 08:00 |
Canned
Member # 8014
|
written Sunday, January 6 2008 13:44
Profile
I placed it wrong. I got the message...every single step. Where should it go? -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Shaper
Member # 3442
|
written Sunday, January 6 2008 13:49
Profile
Homepage
-------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Lifecrafter
Member # 6193
|
written Sunday, January 6 2008 18:45
Profile
Homepage
quote:FYT. :P Void and short are used in the appendix to tell you what type of call it is (Specifically whether or not that call returns a value.) You never actually write short get_health() or void message_dialog(), just the actual call. -------------------- "NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Shaper
Member # 3442
|
written Monday, January 7 2008 02:32
Profile
Homepage
quote:The stupid thing is, I was writing out instant death nodes for my own scenario when I wrote that, and, looking at my scripts, I did it wrong there too... -------------------- Nikki's Nook - bigger than Jesus? Posts: 2864 | Registered: Monday, September 8 2003 07:00 |
Law Bringer
Member # 2984
|
written Monday, January 7 2008 04:26
Profile
Homepage
All this takes me back to '94 when I began to learn Logo... :) Posts: 8752 | Registered: Wednesday, May 14 2003 07:00 |
Shock Trooper
Member # 10488
|
written Monday, January 7 2008 12:48
Profile
Yay Logo! That was the first "programming" language I ever learnt. :P It's almost amazing what you can do with it though. Posts: 334 | Registered: Friday, September 14 2007 07:00 |
Agent
Member # 2759
|
written Monday, January 7 2008 13:24
Profile
Homepage
Me too. A little earlier than 1994, however. -------------------- Geneforge 4 stuff. Also, everything I know about Avernum | Avernum 2 | Avernum 3 | Avernum 4 Posts: 1104 | Registered: Monday, March 10 2003 08:00 |
Shock Trooper
Member # 10488
|
written Monday, January 7 2008 17:10
Profile
For me, it would have been later than 1994, I think. I would have been... um... seven in 1994? Something like that. I don't think I started learning Logo quite that early. I think it was after I got my first Mac (an LC 68k!). Posts: 334 | Registered: Friday, September 14 2007 07:00 |
Canned
Member # 8014
|
written Monday, January 7 2008 17:50
Profile
Uh, what is "Lego"? -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |