ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Help with Functions please

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Help with Functions please

Postby Lazzah » Wed Feb 22, 2017 10:59 am

Hi all, could one of the more learned Drifters please help this old dunce please?

I want to display the name of an object in a task message in upper case. I use the old fashioned function %TheObject[%object%]% when displaying the object name (because I do not understand the new "rocket science" type functions) and thought I would therefore use %UCase% to make the name appear in upper case. However, nothing I have tried seems to work.

Would one of the more knowledgeable Drifters please put me right? I would appreciate it if you would stick to the old functions if possible, the newer functions are just double-dutch to me!

Many thanks in anticipation!
OUT NOW: The Lost Children
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire
User avatar
Lazzah
Moderator
 
Posts: 2008
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England

Re: Help with Functions please

Postby R2T1 » Wed Feb 22, 2017 11:10 am

According to the online help at http://help.adrift.co/ goto General Functions and UCASE is towards the bottom.
UCase

Returns a string that has been converted to upper case.

Syntax
%UCase[text]%

Parameters
text
The text you wish to convert to upper case.

Example
%PCase[Testing]% = TESTING

(Observation - Should %PCase[Testing]% above be %UCase[Testing]% (Could the help file be wrong? :?

so in your case you would want to use %UCase[%TheObject[%object%]%]%

I haven't tested this myself so I may be mistaken.

Hope that helps.
User avatar
R2T1
 
Posts: 66
Joined: Thu Dec 20, 2012 10:41 am
Location: Sydney, Australia

Re: Help with Functions please

Postby Lazzah » Wed Feb 22, 2017 1:37 pm

R2T1 wrote:According to the online help at http://help.adrift.co/ goto General Functions and UCASE is towards the bottom.
UCase

Returns a string that has been converted to upper case.

Syntax
%UCase[text]%

Parameters
text
The text you wish to convert to upper case.

Example
%PCase[Testing]% = TESTING

(Observation - Should %PCase[Testing]% above be %UCase[Testing]% (Could the help file be wrong? :?

so in your case you would want to use %UCase[%TheObject[%object%]%]%

I haven't tested this myself so I may be mistaken.

Hope that helps.

No, you were absolutely correct, R2T1, that worked a treat. I couldn't work out the order of the brackets and %'s. :Thanks: :bravo: :claps: :D
OUT NOW: The Lost Children
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire
User avatar
Lazzah
Moderator
 
Posts: 2008
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest