patataofcourse / adventurescript Goto Github PK
View Code? Open in Web Editor NEWAn engine for text adventures.
An engine for text adventures.
\v[[0, 35].index_of(35)]
results in the following error:
AdventureScript error on script other, line 92 - syntax error:
Escape code \v wasn't supplied an argument, which it requires.
Try using '\v[...]'
They may be useful for detecting regressions
If you try to make an empty list, it will add a None object to it. This is due to the very buggy current implementation where an empty space gets parsed as a None type argument, for use with unary operators.
Because of this, unary operations should probably be rewritten to use a completely different system, or a separate Empty type should be added instead, which will only be accessible internally.
Example:
["game over & other shit", {gameover}] ["exit", None]
Panic shown:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/parsing/mod.rs:349:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Probably a fault of simplifying in brackets mode, gotta check that bracket detecting method.
Backtrace:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/parsing.rs:341:18
stack backtrace:
0: rust_begin_unwind
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
2: core::result::unwrap_failed
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/result.rs:1617:5
3: core::result::Result<T,E>::unwrap
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/result.rs:1299:23
4: adventure_script::parsing::evaluate
at ./src/parsing.rs:339:25
5: adventure_script::parsing::parse_text
at ./src/parsing.rs:57:25
6: adventure_script::parsing::parse_line
at ./src/parsing.rs:23:26
7: adventure_script::AdventureScriptGame::run
at ./src/lib.rs:42:19
8: adventure_script::main
at ./src/main.rs:5:5
9: core::ops::function::FnOnce::call_once
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ops/function.rs:227:5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.