Brackets in strings

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

Brackets in strings

Postby immibis » Sat Oct 17, 2009 10:22 am

For some reason in Thyme, the strings "]", "}", and ")" are syntax errors, as you can see by typing them into the console.
Thymechanic
immibis
 
Posts: 87
Joined: Wed Sep 30, 2009 12:24 am

Re: Brackets in strings

Postby Mystery » Sat Oct 17, 2009 1:17 pm

Do you mean when you put ) on its own it is an error or if you make an actually string like (...).
{} [] () are used for different things, you need the right tools for the job.

Post an example of your error.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Brackets in strings

Postby gradyfitz » Sat Oct 17, 2009 2:17 pm

immibis wrote:For some reason in Thyme, the strings "]", "}", and ")" are syntax errors, as you can see by typing them into the console.

I don't think this is a problem, I don't think that there is any point in time where this would be required, because they are still usable in variables, one error for something that serves no use and doesn't influence anything, is something I don't think is a problem :D.

For anyone who is interested, the errors are:
Code: Select all
-- Warning: Exception thrown: line 1: Unexpected token: } from C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
-- Warning: Caught exception: line 1: Unexpected token: }, C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
Parse error: line 1: Unexpected token: }

This Warning is nothing to worry about in this case :D.
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia

Re: Brackets in strings

Postby immibis » Sun Oct 18, 2009 12:45 am

No, I mean a string containing only one of those characters and nothing else. For example, "}" (including quote marks). If you type it in the console:
Code: Select all
> "}"
-- Warning: Exception thrown: line 1: Unexpected token: } from C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
-- Warning: Caught exception: line 1: Unexpected token: }, C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
Parse error: line 1: Unexpected token: }
Thymechanic
immibis
 
Posts: 87
Joined: Wed Sep 30, 2009 12:24 am

Re: Brackets in strings

Postby BoJaN4464 » Mon Oct 19, 2009 2:24 am

you could try putting a forward slash in front of it like this: "/{" I'm not a thyme expert but a forward slash is usually used in other languages to make the compiler or interpreter read special characters
BoJaN4464
 
Posts: 8
Joined: Fri Sep 18, 2009 1:04 am

Re: Brackets in strings

Postby immibis » Mon Oct 19, 2009 5:27 am

You're thinking of backslashes. But "\}" is still a syntax error.
Thymechanic
immibis
 
Posts: 87
Joined: Wed Sep 30, 2009 12:24 am


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 5 guests