Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Ah, fuck. It happened again!

5 years ago

So... Coding the game so that the player can be both male and female was working fine... Until I got to Chapter 6, page 153 "The other side of the coin" ... What the hell is wrong with it? Coding looks fine to me. Source code looks fine too. It should be working! There's the right amount of %s and they're all in the right place... But no matter what I do, I can't get it to work... Help. crying

Ah, fuck. It happened again!

5 years ago
I mean... post the coded page? Unless you specifically want an admin to look at it or something.

Ah, fuck. It happened again!

5 years ago

Well, I was hoping that an admin would take a look at it, but yeah, good point. Here's the coded page:

<p>When you arrive back at the arena, you soon feel the heavy slap of a wooden sword against your back. You turn around and see Lula, grinning at you with a practice sword in each hand. &quot;%%NAME%=%0%Unknown%%%%NAME%=%1%Andreas%%%%NAME%=%2%Cyrus%%%%NAME%=%3%Demetrius%%%%NAME%=%4%Hector%%%%NAME%=%5%Leon%%%%NAME%=%6%Marcus%%%%NAME%=%7%Sinis%%%%NAME%=%8%Theron%%%%NAME%=%9%Althea%%%%NAME%=%10%Cassandra%%%%NAME%=%11%Diana%%%%NAME%=%12%Echo%%%%NAME%=%13%Galatea%%%%NAME%=%14%Lydia%%%%NAME%=%15%Ophelia%%%%NAME%=%16%Venus%%, you are do fight with me!&quot; she declares, throwing one of the swords to you, which you manage to catch by the hilt. &quot;Mistress is say I good for run fast, but I am need to train fight more, so to kill people,&quot; the girl seems eerily upbeat when she tells you this.</p>

<p>You don&rsquo;t really get a chance to respond to Lula&rsquo;s request, since she takes a swing at you shortly after, which you easily evade. The girl is very aggressive in her fighting technique, quickly turning your spar into a competition of who can hit each other the hardest. Luckily for you, this makes her defence very clumsy.</p>

<p>During your practice, you manage to knock Lula to the ground by hitting her across the back of the legs with the side of your practice sword. That&rsquo;s when you hear a loud and rather self-important voice speaking up from behind you.&nbsp;</p>

<p>%%GENDER%=%1%&quot;Is this how you slaves have fun?&quot; he asks snidely. &quot;Picking on little girls?&quot;%%%%GENDER%=%2%&quot;Cute,&quot; he says snidely. &quot;But I&rsquo;m afraid that won&rsquo;t get you girls far in the arena. If you two want to learn how to really fight, you need to practise with someone stronger.&quot;%%</p>

<p>You turn around to see a richly clad boy, about two or three years older than you. You&rsquo;ve never seen him before, but his resemblance to Caecilia is so uncanny that you have no doubt this is the brother she told you about.</p>

<p>%%GENDER%=%1%&quot;I am not little girl!&quot; Lula objects, getting to her feet. &quot;And he is not picking me. We are do practice.&quot;%%%%GENDER%=%2%&quot;You want I practise you?&quot; Lula asks, sceptically looking the boy up and down. &quot;Am thank you, but I stay fight %%NAME%=%0%Unknown%%%%NAME%=%1%Andreas%%%%NAME%=%2%Cyrus%%%%NAME%=%3%Demetrius%%%%NAME%=%4%Hector%%%%NAME%=%5%Leon%%%%NAME%=%6%Marcus%%%%NAME%=%7%Sinis%%%%NAME%=%8%Theron%%%%NAME%=%9%Althea%%%%NAME%=%10%Cassandra%%%%NAME%=%11%Diana%%%%NAME%=%12%Echo%%%%NAME%=%13%Galatea%%%%NAME%=%14%Lydia%%%%NAME%=%15%Ophelia%%%%NAME%=%16%Venus%%. She being more strong than you, I think.&quot;%%</p>

<p>%%GENDER%=%1%The boy seems surprised that Lula is standing up for you. He probably thought he was coming to her rescue. To be fair, you doubt that he&rsquo; s met any girls quite so fierce as Lula before. &quot;Well, he should be practising with other boys instead of hurting a girl,&quot; he insists, picking up one of the practice swords himself. &quot;In fact, he can practice with me.&quot;%%%%GENDER%=%2%The boy seems surprised and offended that Lula would choose you as a sparring partner over him. He probably saw this as an opportunity to show off, and isn&rsquo;t pleased that Lula insinuated he looks weaker than a girl. &quot;You think so, do you?&quot; he asks irritably. &quot;Well, maybe she should be the one to spar me, and we can see for ourselves.&quot;%%</p>

<p>&quot;Septimus!&quot; you hear Titus calling from the stairs where he and Rhode are watching you train. &quot;What have I told you about causing trouble?&quot;</p>

<p>%%GENDER%=%1%&quot;I&rsquo;m not causing trouble!&quot; his son objects. &quot;The boy wants a fight, I&rsquo;m just giving him a real challenge,&quot; he says as he turns back to you. &quot;Come on, you&rsquo;re not afraid of a proper fight, are you, boy?&quot;%%%%GENDER%=%2%&quot;I&rsquo;m not causing trouble!&quot; his son objects. &quot;This girl&rsquo;s learning to fight, I&rsquo;m just giving her a real challenge,&quot; he says as he turns back to you. &quot;Come on, girl. Don&rsquo;t worry, I promise I&rsquo;ll go easy on you.&quot;%%</p>

Ah, fuck. It happened again!

5 years ago

Now, the first gender related bit, where Septimus either says, "Is this how you slaves have fun? Picking on little girls?" or "Cute, But I'm afraid that won't get you girls far in the arena," originally wasn't working. I actually managed to get that part to work, but I have no idea how. >.<

Ah, fuck. It happened again!

5 years ago
My first guess is that the problem is with this: %%GENDER%=%2%"You want I practise you?" Lula asks, sceptically looking the boy up and down. "Am thank you, but I stay fight %%NAME%=%0%Unknown%%%%NAME%=%1%Andreas%%%%NAME%=%2%Cyrus%%%%NAME%=%3%Demetrius%%%%NAME%=%4%Hector%%%%NAME%=%5%Leon%%%%NAME%=%6%Marcus%%%%NAME%=%7%Sinis%%%%NAME%=%8%Theron%%%%NAME%=%9%Althea%%%%NAME%=%10%Cassandra%%%%NAME%=%11%Diana%%%%NAME%=%12%Echo%%%%NAME%=%13%Galatea%%%%NAME%=%14%Lydia%%%%NAME%=%15%Ophelia%%%%NAME%=%16%Venus%%. She being more strong than you, I think."%%

I don't think you can reference two variables in the same block of on page scripting.

Ah, fuck. It happened again!

5 years ago

Fuck! >.<

(Also, to reply to your earlier question... Lula doesn't speak Engrish, she speaks Laytin.) ^_^

Ah, fuck. It happened again!

5 years ago
Lol, I figured it wasn't a typo after all because she also wanted you to 'do fight.' And with her is not like it'd be easy to tell whether it was intended or not.

Ah, fuck. It happened again!

5 years ago
I haaaaate the RTE. Just looking at this angers me.
>:(

I don't think my brain can parse this on mobile, I'll check it out as soon as I can get to a computer unless Killa or someone beats me to this.

Ah, fuck. It happened again!

5 years ago

I should really just turn off RTE... But, from what I understand, if I do that, I can't use bold/italics/coloured text... And my game needs bold, italics and coloured text. >.<

Ah, fuck. It happened again!

5 years ago
You can do all the same formatting stuff and more, you just use HTML tags instead of clicking the button.

At any rate the RTE wasn't the problem this time, I just find it incredibly ugly to look at.

Ah, fuck. It happened again!

5 years ago

Oh, okay... Well, if RTE isn't the actual problem, I think I'll just keep it and give everybody a blinding headache whenever I have a coding problem. cheeky

Ah, fuck. It happened again!

5 years ago

... And I just realised what the problem was. Half of the gender related coding has a 0 in there instead of a %... I'm a fucking idiot. >.<

Edit: Oh wait... No it doesn't... It just shows up as a 0 when I play the game... Curse you RTE!!! angry

Ah, fuck. It happened again!

5 years ago
Seriously just separate the NAME stuff from that one block I pasted and see if that fixed the GENDER bit. Then idk maybe just refer to 'her' or 'him' instead of the protag by name.

Ah, fuck. It happened again!

5 years ago

So basically, when I play the game, it shows up like this:

When you arrive back at the arena, you soon feel the heavy slap of a wooden sword against your back. You turn around and see Lula, grinning at you with a practice sword in each hand. "Hector, you are do fight with me!" she declares, throwing one of the swords to you, which you manage to catch by the hilt. "Mistress is say I good for run fast, but I am need to train fight more, so to kill people," the girl seems eerily upbeat when she tells you this.

 

You don’t really get a chance to respond to Lula’s request, since she takes a swing at you shortly after, which you easily evade. The girl is very aggressive in her fighting technique, quickly turning your spar into a competition of who can hit each other the hardest. Luckily for you, this makes her defence very clumsy.

 

During your practice, you manage to knock Lula to the ground by hitting her across the back of the legs with the side of your practice sword. That’s when you hear a loud and rather self-important voice speaking up from behind you. 

 

"Is this how you slaves have fun?" he asks snidely. "Picking on little girls?"

 

You turn around to see a richly clad boy, about two or three years older than you. You’ve never seen him before, but his resemblance to Caecilia is so uncanny that you have no doubt this is the brother she told you about.

 

"I am not little girl!" Lula objects, getting to her feet. "And he is not picking me. We are do practice."%%GENDER%=%2%"You want I practise you?" Lula asks, sceptically looking the boy up and down. "Am thank you, but I stay fight Hector. She being more strong than you, I think."%%

 

%%GENDER%=%1%The boy seems surprised that Lula is standing up for you. He probably thought he was coming to her rescue. To be fair, you doubt that he’ s met any girls quite so fierce as Lula before. "Well, he should be practising with other boys instead of hurting a girl," he insists, picking up one of the practice swords himself. "In fact, he can practice with me."0GENDER%=%2%The boy seems surprised and offended that Lula would choose you as a sparring partner over him. He probably saw this as an opportunity to show off, and isn’t pleased that Lula insinuated he looks weaker than a girl. "You think so, do you?" he asks irritably. "Well, maybe she should be the one to spar me, and we can see for ourselves."%%

 

"Septimus!" you hear Titus calling from the stairs where he and Rhode are watching you train. "What have I told you about causing trouble?"

 

%%GENDER%=%1%"I’m not causing trouble!" his son objects. "The boy wants a fight, I’m just giving him a real challenge," he says as he turns back to you. "Come on, you’re not afraid of a proper fight, are you, boy?"0GENDER%=%2%"I’m not causing trouble!" his son objects. "This girl’s learning to fight, I’m just giving her a real challenge," he says as he turns back to you. "Come on, girl. Don’t worry, I promise I’ll go easy on you."%%


... But that 0 in the coding is not there when I try to edit the game. According to both RTE and the source code, that 0 should be a %%%%... But when I try to play the game, it shows up as a 0... My head hurts. crying

Ah, fuck. It happened again!

5 years ago
Just look at the first place where it breaks, that's the issue and it's breaking everything after.

Ah, fuck. It happened again!

5 years ago

Okay! ^_^

Edit: Right, that's fixed it... Thank you! heartheartheart

Ah, fuck. It happened again!

5 years ago
Yeah, you can't have two different variable checks nested in one another.

Ah, fuck. It happened again!

5 years ago

No fair. sad

Ah, fuck. It happened again!

5 years ago
Yeah, you can use =, !=, >, and <.

It takes some creative sentence building to use On-Page Code to it's fullest.

Sometimes, for the complicated stuff, you'll have to go with the page script $PAGETEXT = $PAGETEXT + "more stuff", because in the case of $PAGETEXT, you can first compare two or more %VARIABLES before deciding if it applies, rather than just one at a time with On-Page Code.

Also, On-Page Code doesn't handle paragraph breaks, while $PAGETEXT does.

Ah, fuck. It happened again!

5 years ago

Think it'll probably just be simpler for me to have a seperate page for the male and female characters, sometimes... Will definitely need to be doing that in the sequels, anyway. Stories go off in two completely different directions. ^_^