question

ArcadeUser-3289 avatar image
0 Votes"
ArcadeUser-3289 asked ArcadeUser-3289 commented

"Operation TextWindow.WriteLine is supplied 14 arguments but only takes 1" Small Basic error

I try to run my Mad libs code and it keeps on saying this. Please look at my code everyone and type the answer if you know it (by the way the error is on the last TextWindow.WriteLine all the way at the bottom where all the mad libs comes together): TextWindow.WriteLine("Enter your name")
Name = TextWindow.Read()
TextWindow.WriteLine("Hello " + Name + "!")

TextWindow.WriteLine("Enter an verb")
Verb1 = TextWindow.Read()

TextWindow.WriteLine("Enter a name of a superhero that is fast on ground")
HeroName1 = TextWindow.Read()

TextWindow.WriteLine("Name of objects or people (plural) (objects include: papers, phones, etc)")
RobberName = TextWindow.Read()

TextWindow.WriteLine("Action to do to someone (handcuff, punch, etc.)")
ActionToRobber = TextWindow.Read()

TextWindow.WriteLine("Way of transportation")
transportation = TextWindow.Read()



TextWindow.WriteLine(Verb1 "You run like " HeroName1 "Look, you got an alert on a nearby bank robbery caused by " RobberName "I think it's time for" HeroName1 "to save the day! You get there by" transportation "! You enter and " ActionToRobber "him! You use your" transportation "to get him to the police station! You are now a hero! Enjoy your time as a hero; but one thing first, you have to like this program right now to continue being a hero! Bye!")




small-basic
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LitDev-4187 avatar image
0 Votes"
LitDev-4187 answered ArcadeUser-3289 commented

You need to concatenate the strings in the final writeline with +

Without, just using spaces, small basic interprets the strings as if they were separate arguments, 14 of them as if separated by commas

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you so much, you really helped me here is the link to my project: http://smallbasic.com/program/?NJZW863.000

0 Votes 0 ·