left parenthesis?

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: left parenthesis?
Master
Member # 5977
Profile Homepage #0
I've started working ona better and newer version of my cashmachine script, this version letting the player enter an amount of money by themselves. However, I've run into a problem which I can't understand. The game gives the error: unmatched left parenthesis, at this line:

amount_to_withdraw = get_text_response("") amount to withdraw being a vraiable which I defined as it should be.

Could anybody help me please?

--------------------
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
? Man, ? Amazing
Member # 5755
Profile #1
Please post more than one line of script at a time.

That said, look to your last line containing parentheses. It is missing a right parenthesis.

--------------------
quote:
Originally written by Kelandon:

Well, I'm at least pretty sure that Salmon is losing.


Posts: 4114 | Registered: Monday, April 25 2005 07:00
Infiltrator
Member # 5576
Profile Homepage #2
First, it looks like you're not using get_text_response correctly. If you look in the docs you will see that it has a void return type, so doing that assignment is meaningless. Basically to use it you need to call get_text_response and then repeatedly call check_text_response to see if the response was one of a set of particular strings. You should take a look at the numeric input script that someone made (Kelandon?). In any case, you can see a good example of numeric input in the part of the HLPM that asks for a level to make the party.

Another thing to keep in mind about debugging in general is that even a good compiler may be confused by an error on one line, not report it, and then start reporting nonsense errors on following lines. So if you really think a line is correct when you're told there is an error there, take a close look at the lines above it; they are often to blame.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Off With Their Heads
Member # 4045
Profile Homepage #3
The Numeric Input script is in the latest version of the High Level Party Maker, in t2Raiser.txt, in state 12. This is available from my website. I recommend borrowing it wholesale.

--------------------
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
Agent
Member # 2820
Profile #4
I am pretty sure Thralni wants to figure out how to do this numeric input script himself, though I do recommend at least looking at Kelandon's as a guide to help you along.

The parenthesis problem is not necessarily on the line given; this error just means that the "(" on that line does not have a matching ")" after it. Try looking at the lines after this one.

[ Friday, June 16, 2006 16:36: Message edited by: Garrison ]

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Master
Member # 5977
Profile Homepage #5
I was trying to think of a script that had this, but couldn't remember one. Therefor I started from scratch. I will now certainly look at kelandon's script.

Niemand: the party enters a number, and I assumed that with this specific call and this variable, I could store a number in that variable, returned by that specific call. I also checked the other lines repeatedly, but couldn't find anything. That's why I decided to ask about it here.

EDIT: Okay, looked at kelandon's script, and I saw exactly that thing that I wanted to see if I can pass around it. Probably not *sighs*

[ Friday, June 16, 2006 23:32: Message edited by: Mc 'mini' Thralni ]

--------------------
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
...b10010b...
Member # 869
Profile Homepage #6
quote:
Originally written by Mc 'mini' Thralni:

EDIT: Okay, looked at kelandon's script, and I saw exactly that thing that I wanted to see if I can pass around it. Probably not *sighs*
No, there's no way around checking for every number individually. The party's response to a text response call is stored as a string, and the engine isn't smart enough to tell whether a string contains a number.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Guardian
Member # 6670
Profile Homepage #7
By Thuryl:
quote:
No, there's no way around checking for every number individually. The party's response to a text response call is stored as a string, and the engine isn't smart enough to tell whether a string contains a number.
--------------------
Deep down inside, JV knows he should have programmed in Perl.
Posts: 1509 | Registered: Tuesday, January 10 2006 08:00
Master
Member # 5977
Profile Homepage #8
There's no real need in quoting the same post over and over again, you know.

--------------------
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
...b10010b...
Member # 869
Profile Homepage #9
Um, what? I don't see where the same post got quoted twice in this thread. I replied to your post, and Dintiradan replied to mine.

[ Saturday, June 17, 2006 08:49: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Shaper
Member # 73
Profile #10
He was probably confused because for some reason, Dintiridan used the "signature hyphen row" between the quoted text and his response, making it seem like he simply quoted the post without saying anything else, and the response seemed like part of the signature.

--------------------
My Myspace, with some of my audial and visual art
The Lyceum - The Headquarters of the Blades designing community
The Louvre - The Blades of Avernum graphics database
Alexandria - The Blades of Exile Scenario database
BoE Webring - Self explanatory
Polaris - Free porn here
Odd Todd - Fun for the unemployed (and everyone else too)
They Might Be Giants - Four websites for one of the greatest bands in existance
--------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Posts: 2957 | Registered: Thursday, October 4 2001 07:00
Master
Member # 5977
Profile Homepage #11
I got it working now. Thanks, kelandon, for letting me copy a part of that script. Maybe, when i feel very bored, I'll extend the range of 1 - 100 coins to 1 - 250 coins.

--------------------
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
Off With Their Heads
Member # 4045
Profile Homepage #12
You could, of course, change it to 10-coin increments or something. That way it wouldn't be too hard to make it much more flexible.

--------------------
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