Okay so I am an art\GAME student. and I am SUPER NEW to coding.
Right now I’m using Chapel’s custom Cycle Macro to have a ‘time’ system and a ‘days’ system, because in my game, I want there to be certain events that only happen say…night time on a tuesday.
And Im having trouble getting an If statement to work, because the macro involves strings.
So, I’m not very familiar with most of @Chapel 's custom macro’s, so I’ll let them (or someone more familiar than me) field this question.
However, I will suggest you use the </> button in the editor to format your code. Right now the forum is eating your tags and making really difficult to read your code. That button will prevent that.
As far as I can tell that worked perfectly!!! Thank you so so much!
I’m making like…a text based Detective RPG. So that mechanic was important… thank you so much!
As the developer of these libraries it’s really my job to add methods. You can do it, but it’s not really for beginners. Since you asked though, you’d do something like:
You can use the Cycle.get('time').current() is 'Afternoon' way still if you want. You will need to install the new version of the cycle system macros to use the new methods.
@Chapel or anyone else that knows
So I am using the Dialogue Box Macro, and everything has worked. but when I run this:
<<if $hugo.localtrustscore gte 2>>\
<<say 'Hemsly the Coachman' 'C:/Users/jarri/Downloads/coachman.jpg'>>\
Quite sorry sir! We are almost to Vicoria. Not much Longer now.
<</say>>
<<elseif $hugo.localtrustcore lt 0>>
<<say 'Theodore Hemsly' 'C:/Users/jarri/Downloads/coachman.jpg'>>\
Whoops...sorry about that. I'd gather your things and hang on. Vicoria's close. But it's a bumpy ride til' then.
<</say>>
<<elseif $hugo.localturstscore is 0>>
<<say 'Hemsly the Coachman' 'C:/Users/jarri/Downloads/coachman.jpg'>>\
Quite sorry sir! We are almost to Vicoria. Not much Longer now.
<</say>>
<</if>>
The dialogue box and picture only load for the first <> statement.
otherwise, the others still load, but not the dialouge box or anything in it. I dont get an error message or anything.
Also sorry for doign this on a reply, It wont let me make new messsages or posts for 4 more hours.
For putting code inline <like this>, you use a back tick.
Example: `<like this>`
And to solve your problem, you somehow managed to misspell localtrustscore in both of your elseif statements. I bet it’ll work if you spell them correctly.
Additionally, even once you fix the spelling, nothing will happen if $hugo.localtrustscore is greater than 0 and less than 2. I’m not sure if you wanted nothing to happen if, for example, $hugo.localtrustscore was set to 1.
You might want to just replace <<elseif $hugo.localturstscore is 0>> with <<else>> so that all of your bases are covered.