Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

What the .... is wrong with this coding?!?!?

10 years ago

Ok ok. It used to work just fine. The Digits displaying the name, the male/female display, all that wasn't working was displaying the traits in my game. I was like, "ok fine, let me see what's wrong..." I had the traits typed in wrong. So instead of going back and changing every TRAITS1 and TRAITS2 to TRAIT1 and TRAIT2, I was a lazy butt and just went into the variables and changed the names. So I was like, "ok, that should work, let's test it." Not only are the traits still messed up, but the other displays that were working are now screwed up. I went into the editor and I was like "ok, let me see here." Advanced scripting is ON and similar variables still work perfectly. I tried retyping the whole string of code into the editor, but it didn't work so that was a waste of my time. And I noticed that when I go into the game to test the display, ONLY THE PARTS WITH "%%%%" are screwed up. They show up in the code as "0" instead of what they should be. But in the editor they appear just fine. What the hell is wrong with it?

 

Codes:

Typical name code: %%DIGIT1%=%1%A%%%%DIGIT1%=%2%B... etc.

Male/Female code: %%SEX%=%1%Female%%%%SEX%=%2%Male%%

Traits code (now this one was a little tricky because there are three codes and I'm only using two strings, but I looked it up and figured it out so here it is): 

%%TRAIT1%=%1%Friendly%%%%TRAIT1%=%2%Neutral%%%%TRAIT1%=%3%Aggressive%%

%%TRAIT2%=%1%Soldier%%%%TRAIT2%=%2%Hunter%%%%TRAIT2%=%3%...etc. etc.

PLEASE HELP MEEEEE!

What the .... is wrong with this coding?!?!?

10 years ago
Just a quick look -- but have you tried a space between the two pairs of percent marks? In other words, wherever you have %%%%, see if %% %% works instead...

What the .... is wrong with this coding?!?!?

10 years ago

yeah, it got even more messed up and I had to put it back....

What the .... is wrong with this coding?!?!?

10 years ago

The code you gave is working for me, and even if there's no TRAIT variable, it just shows nothing. Maybe check to make sure you have your percent signs right? %%%% by itself does parse as zero, so a couple stray (or missing) %s could be the issue.

What the .... is wrong with this coding?!?!?

10 years ago

looked and everything is fine... -.-

What the .... is wrong with this coding?!?!?

10 years ago

I was able to reproduce your error. It starts out as "%DIGIT1%=%10%J0", right? Not at the beginning, but where DIGIT1 = 10. So that's where the error is. I think you might be missing a % right before that part, so check there.

What the .... is wrong with this coding?!?!?

10 years ago

That's exactly it! Alright I'll try it and let you know if it worked!

What the .... is wrong with this coding?!?!?

10 years ago

No dice. I double checked and ALL of the "%" signs are EXACTLY where they should be. Didn't I mention that this particular coding string (%%DIGIT1%=%1%A%%%%... etc. etc.) worked before I messed up the variables? I didn't do ANYTHING to this string and now it's screwed up. Why don't I add you as co-author to see if you can fix it?

What the .... is wrong with this coding?!?!?

10 years ago

Sure. I'll see what I can do.

What the .... is wrong with this coding?!?!?

10 years ago

Alright let me just add you...

What the .... is wrong with this coding?!?!?

10 years ago

ok, you're added...

What the .... is wrong with this coding?!?!?

10 years ago

Have you looked in the source? Because that's what seems to be the problem. It's inserting span tags in the wrong places.

What the .... is wrong with this coding?!?!?

10 years ago

As stated in my profile, I SUCK AT CODING so I have no idea what the source even is. The only thing that I know of aside from on-page coding is what I copy/pasted into the page script or whatever it was to create a codex and that didn't have any problems before. If you can explain to me what the source is and how to fix it or if you can fix it yourself I'd be very happy and grateful.

What the .... is wrong with this coding?!?!?

10 years ago

The source shows the HTML of the page rather than rich text (I'm pretty sure there's some kind of "view source" button). While it may look like %%DIGIT1%=%1%A%% in the rich text editor, in the source it looks something like %%<span style="font-family:arial,helvetica,sans-serif; font-size:14px">DIGIT1%=%1%A%%</span>. It's putting HTML in all these weird places, messing up the on-page coding.

I got rid of the offending HTML, so it should be working now.

What the .... is wrong with this coding?!?!?

10 years ago

Thanks, I'll try it out and get back to you.....

Testing......

What the .... is wrong with this coding?!?!?

10 years ago

YES IT WORKS! Thank you so much,. I totally owe you now! :) You've been a big help, thank you so much you have no idea how happy I am now!

What the .... is wrong with this coding?!?!?

10 years ago

Glad I could be of service. :)

What the .... is wrong with this coding?!?!?

10 years ago
"So instead of going back and changing every TRAITS1 and TRAITS2 to TRAIT1 and TRAIT2, I was a lazy butt and just went into the variables and changed the names."

Um, that's why? There's a warning when you change the names it could mess up existing things.

Why dont you copy and paste your variables list.

What the .... is wrong with this coding?!?!?

10 years ago

How do I do that? I know you've helped people in the past Killa (i.e Kiel_Farren) so can you help me? P.S I didn't think the changing of the names warning would apply to this. that's why...

What the .... is wrong with this coding?!?!?

10 years ago
Just highlight the variable names in your list then copy and paste it to here.

You should also post EXACTLY what your code is. Doing "...etc" isn't good because the error could be in the part of the code you didn't post.