How to make something not work if not carrying 2+ objects?
zeldafreak1312
23 Jul 2013, 18:04( Sorry if the title didn't make any sense, I didn't quite know how to word it xP )
So, this is what I'm trying to do:
I am trying to make an option where if you do not have two objects from this room, leave, and then come back, you get a variation of the "first time" message. The only problem I'm having with this coding is that I can't quite seem to get the "if (not Got(note and chainmail))" coding right. When I run the game to test it out, it comes up with an error message saying this:
Does anyone know how I can get this to work properly? I included the coding just in case you want to take a look at it for yourself. Thank you to anyone who helps!
( Again, I'm sorry if this is a little confusing, I just don't seem to understand what the exact problem is ^^; )
So, this is what I'm trying to do:
firsttime {
msg ("You head into the blue tent to look for anything worthwhile. Inside is a bloodied cot, a writing board with a note on it, and a strangely closed chest with some chainmail hanging out of the chest.")
}
otherwise {
if (not Got(note and chainmail)) {
msg ("You head back into the blue tent to look again. Inside is the bloodied cot, the writing board with a note on it, and a strangely closed chest with some chainmail hanging out of the chest.")
}
else if (not Got(note)) {
msg ("You head back into the blue tent to look again. Inside is the bloodied cot, the writing board with a note on it, and the chest that held the chainmail you have.")
}
else if (not Got(chainmail)) {
msg ("You head back into the blue tent to look again. Inside is the bloodied cot, the writing board that had the note you took, and a strangely closed chest with some chainmail hanging out of the chest.")
}
else {
msg ("You head back into the blue tent to look again. Inside is the bloodied cot, the writing board that had the note you took, and the chest that held the chainmail you have.")
}
}
I am trying to make an option where if you do not have two objects from this room, leave, and then come back, you get a variation of the "first time" message. The only problem I'm having with this coding is that I can't quite seem to get the "if (not Got(note and chainmail))" coding right. When I run the game to test it out, it comes up with an error message saying this:
Error running script: Error compiling expression 'not Got(note and chainmail)': AndOrElement: Operation 'And' is not defined for types 'Element' and 'Element'
Does anyone know how I can get this to work properly? I included the coding just in case you want to take a look at it for yourself. Thank you to anyone who helps!
( Again, I'm sorry if this is a little confusing, I just don't seem to understand what the exact problem is ^^; )

Pertex
23 Jul 2013, 19:40Try this one:
if (not Got(note) and not Got(chainmail)) {
zeldafreak1312
01 Aug 2013, 00:11Sorry for the long wait, but if finally worked! Thank you so much~!
Silver
02 Aug 2013, 11:35Not sure I'd describe a closed chest as being 'strangely closed'. What's strange about a chest being closed?

EdwardVersaii
19 Aug 2013, 18:51zeldafreak1312 wrote:(
"You head into the blue tent to look for anything worthwhile. Inside is a bloodied cot, a writing board with a note on it, and a strangely closed chest with some chainmail hanging out of the chest.)
How about ", and a strange chest jammed shut with some chainmail hanging out."