create account

how to modify an object in a table in inform 7 by jfmherokiller

View this thread on: hive.blogpeakd.comecency.com
· @jfmherokiller ·
$0.34
how to modify an object in a table in inform 7
I want to share a trick I learned handling inform7 stories when you want to make debug commands
```
unresolvecheat is an action applying to one topic.

understand "unresolve [text]" as unresolvecheat.
carry out unresolvecheat:
	repeat with X running from 1 to number of filled rows in Table of GameEventIDs:
		choose row X from the Table of GameEventIDs;
		if Name entry exactly matches the text topic understood, case insensitively:
			now Object entry is unresolved;
			break;
```
the above code functions to modify the property of an event in the table of GameEventIDs
so that the player can attempt it again.

at first I was having trouble because i couldnt figure out how to modify a property of a selected row but then i figured out the answer was Object entry. This is important because X which is what i attempted to use at the start is not the object but the index of the object in the table.

ergo I attempted to make this line work 
```
now X is unresolved;
```
but it was syntaticly invalid
👍  , , , , , , , ,
properties (23)
authorjfmherokiller
permlinkhow-to-modify-an-object-in-a-table-in-inform-7
categoryprogramming
json_metadata{"tags":["programming","technology","inform7"],"app":"hiveblog/0.1","format":"markdown"}
created2020-06-29 08:04:54
last_update2020-06-29 08:04:54
depth0
children2
last_payout2020-07-06 08:04:54
cashout_time1969-12-31 23:59:59
total_payout_value0.170 HBD
curator_payout_value0.169 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,002
author_reputation311,353,057,143
root_title"how to modify an object in a table in inform 7"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,238,383
net_rshares1,415,432,839,601
author_curate_reward""
vote details (9)
@gitplait-mod2 ·
It's nice sharing your ideas and I really do appreciate you for that.

Thanks for sharing 👍

<sub> **Your post has been submitted to be manually curated by @gitplait community account because this is the kind of publications we like to see in our community.** </sub>

Join our [Community on Hive](https://hive.blog/trending/hive-103590) and Chat with us on [Discord](https://discord.gg/CWCj3rw).

[[Gitplait-Team]](https://gitplait.tech/)

properties (22)
authorgitplait-mod2
permlinkre-jfmherokiller-qcomrv
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2020.06.2"}
created2020-06-29 10:08:03
last_update2020-06-29 10:08:03
depth1
children1
last_payout2020-07-06 10:08:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length440
author_reputation28,898,670,427
root_title"how to modify an object in a table in inform 7"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,239,731
net_rshares0
@jfmherokiller ·
you are welcome inform7 is a tough language not just to code but to also describe because of its english-like (well too be fair it also supports other languages) syntax. you can quickly end up trying to describe the language using parts of the language.
properties (22)
authorjfmherokiller
permlinkqcp7p9
categoryprogramming
json_metadata{"app":"hiveblog/0.1"}
created2020-06-29 17:39:15
last_update2020-06-29 17:39:15
depth2
children0
last_payout2020-07-06 17:39:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length253
author_reputation311,353,057,143
root_title"how to modify an object in a table in inform 7"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,246,079
net_rshares0