Cutscene problem
Author | Topic: Cutscene problem |
---|---|
Infiltrator
Member # 4826
|
written Wednesday, December 28 2005 20:21
Profile
I have a problem with this cutscene I've just begun to make (code below). Whenever I test it and start the cutscene, it relocates the characters, but then ends the cutscene and gives me an error message saying,"Improper command in line 0." Now, if I've made a clumsy mistake, laugh all you want, but please just help me. -------------------- Bring back TM or [i]DIE.[/i] To spread the hype, as well as cause your crush's name to appear on the screen, copy this into your signature. Posts: 458 | Registered: Friday, August 6 2004 07:00 |
Law Bringer
Member # 4153
|
written Wednesday, December 28 2005 21:55
Profile
Homepage
I doubt this, but maybe it's the space before "begintownscript;" Honestly, I can't see what would give an Improper Command error... but here's one unrelated pointer, regarding this bit of code: As is, the code will erase the new bubble before the player ever sees it. It should read: -------------------- Gamble with Gaea, and she eats your dice. I hate undead. I really, really, really, really hate undead. With a passion. Posts: 4130 | Registered: Friday, March 26 2004 08:00 |
The Establishment
Member # 6
|
written Thursday, December 29 2005 07:16
Profile
Generally such an error is due to some unmatched overlapping bracketing, weird parenthesis, or some overlapping syntax error that the engine cannot detect. In your case, be sure to put a bracket { to enclose the while loop (in other words immediately after your while command). You end bracket terminates the if statement and your second one terminates the while loop which is, well, strange. See if this fixes it. Also, use some spacing for every conditional/loop block. It makes your code easier to read. [ Thursday, December 29, 2005 07:20: Message edited by: *i ] -------------------- Your flower power is no match for my glower power! Posts: 3726 | Registered: Tuesday, September 18 2001 07:00 |
Infiltrator
Member # 4826
|
written Thursday, December 29 2005 08:41
Profile
quote:There is already an end bracket. Thanks for trying though. EDIT: Strange, it works now that I've put the same script into a new TextEdit file and changed the name of the script. Must've just been a nasty bug. [ Thursday, December 29, 2005 09:25: Message edited by: Fire Shards ] -------------------- Bring back TM or [i]DIE.[/i] To spread the hype, as well as cause your crush's name to appear on the screen, copy this into your signature. Posts: 458 | Registered: Friday, August 6 2004 07:00 |
Master
Member # 5977
|
written Thursday, December 29 2005 09:29
Profile
Homepage
No, what he/she (I'm sorry, but I don't know you're gender, *I) means, is that you should do the following: Your code: Your modified code by me: *I, this is what you eamnt, didn't you? otherwise i didn't understand it. [ Thursday, December 29, 2005 09:30: Message edited by: Thralni, chicken god prophet ] -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
Infiltrator
Member # 4826
|
written Thursday, December 29 2005 10:20
Profile
quote:Sorry, I meant starting bracket. Thralni, I think *i just didn't see the first bracket after the while statement. -------------------- Bring back TM or [i]DIE.[/i] To spread the hype, as well as cause your crush's name to appear on the screen, copy this into your signature. Posts: 458 | Registered: Friday, August 6 2004 07:00 |
Master
Member # 5977
|
written Thursday, December 29 2005 11:38
Profile
Homepage
No, i think you really have to put the starting bracket directly after the while statement, so like this: while (your statement here) { I'm not for 100% sure of this, but I'm quite certain it has to be done this way. -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
The Establishment
Member # 6
|
written Thursday, December 29 2005 11:52
Profile
Thralni is correct about what I meant: This is the way I would write it and it usually works. It's also easier to see for debugging. I read through line by line, and couldn't find anything obvious, but I have a couple comments: 1) Avoid using flag 0,0 its use tends to be troublesome in BoE and I have suspicions about it in BoA. 2) A pause of 4 might be a bit too short, keep in mind that 4 means 0.4 seconds which is quite fast. I would recommend 10 for non-native English speakers. Ideal would be allowing the user to set cutscene speed. Consult the abilities of Bahssikava and some of TMs scenarios to understand the implementation. 3) The end() command is a bit redundant unless you have more coding you are not showing us in this state. You can probably eliminate it. Oh yes, sometimes text editors will create goofy characters at the beginning of a file for purposes of keeping track of things. I would suggest using the simplest text editor you can find for this sort of stuff. [ Thursday, December 29, 2005 12:02: Message edited by: *i ] -------------------- Your flower power is no match for my glower power! Posts: 3726 | Registered: Tuesday, September 18 2001 07:00 |
Off With Their Heads
Member # 4045
|
written Thursday, December 29 2005 12:34
Profile
Homepage
Placement of the brackets doesn't matter. I used to put brackets in the places where Fire Shards is putting them, and it worked just fine. Alint gives me nothing. I'm pretty sure the syntax here is correct, although some of the effects (erase_text_bubbles, as mentioned above) will not be the ones desired. Is there more to the script than this? -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Infiltrator
Member # 3040
|
written Thursday, December 29 2005 13:08
Profile
Is it possible that line endings are the problem? Similar to what *i mentioned about bad characters, I've had problems with line endings where the game didn't recognize them. Are you using a Mac or a PC? If you're on a Mac, are you using TextEdit? -------------------- 5.0.1.0.0.0.0.1.0... Posts: 508 | Registered: Thursday, May 29 2003 07:00 |
Infiltrator
Member # 4826
|
written Thursday, December 29 2005 14:31
Profile
Yes, I'm on TextEdit, and I don't really need pointers because I'm not releasing this scen, but this friend of mine loves BoA and wanted me to make a cool cutscene for him. Just making things clear to those who are hoping for new scenario releases. -------------------- Bring back TM or [i]DIE.[/i] To spread the hype, as well as cause your crush's name to appear on the screen, copy this into your signature. Posts: 458 | Registered: Friday, August 6 2004 07:00 |
Infiltrator
Member # 3040
|
written Thursday, December 29 2005 21:05
Profile
The issue I had with TextEdit was actually from mucking around with the A4 scripts rather than BoA, but it might be the same. Basically, I found that a new line in TextEdit (by hitting the "return" key) had hex value 0x0A, while the original line breaks in the scripts had hex value 0x0D. Changing the edited line breaks to the original ones (by copying and pasting) solved the issue. I don't know how you can fix it, but try editing it in a different text editor, and use a find and replace to change all the original line breaks to new ones. Does that make sense? I hope I'm being clear. -------------------- 5.0.1.0.0.0.0.1.0... Posts: 508 | Registered: Thursday, May 29 2003 07:00 |
Law Bringer
Member # 4153
|
written Thursday, December 29 2005 21:29
Profile
Homepage
That's odd... TextEdit has always worked fine for me. -------------------- Gamble with Gaea, and she eats your dice. I hate undead. I really, really, really, really hate undead. With a passion. Posts: 4130 | Registered: Friday, March 26 2004 08:00 |
Infiltrator
Member # 3040
|
written Thursday, December 29 2005 21:44
Profile
Well then that's probably not the problem. I was just offering a possible solution; if it's worked for you in the past, probably nothing has changed. -------------------- 5.0.1.0.0.0.0.1.0... Posts: 508 | Registered: Thursday, May 29 2003 07:00 |
Master
Member # 5977
|
written Thursday, December 29 2005 23:41
Profile
Homepage
I once used Simpletext, but stopped using it as it was to unclear. tabs didn't show up right and it was a pain to use. Therefor i decided to use "BBedit lite 6.1." The best thing is, that 6.1, as its an outdated version, can be downloaded for free. You ca do that on any free software download website, like twucows (or something like that, i can't really remember what it was called). Try that. -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |