OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: klavan on 14 May 2005, 17:51:18

Title: Hint format localize
Post by: klavan on 14 May 2005, 17:51:18
I need help with the sintax, as the following is wrong: i've always receive error message like <<error hint: array, expected string>>
Code: [Select]
hint [format [localize "STRM_Stat_1"], _grnum, _dbehav, _dform, _dsoldiers, _group]
The string should be as the following:

Code: [Select]
STRM_Stat_1,"Group %1\nRadio name: %5\nBehaviour: %2\nFormation: %3\nNumber of units: %4\nEmbarked: YES","Gruppo %1\nNome radio: %5\nApproccio: %2\nFormazione: %3\nNumero di unità: %4\nImbarcato: SI'"

Can anyone help, please?
Thanks for your help!
Title: Re:Hint format localize
Post by: Grizzlie on 14 May 2005, 19:37:35
For me it is problem with "format" and it should look like:
Code: [Select]
hint format ["%1", localize "STRM_Stat_1"], _grnum, _dbehav, _dform, _dsoldiers, _group]
Title: Re:Hint format localize
Post by: macguba on 14 May 2005, 19:48:54
My guess is

hint format ["localize {STRM_Stat_1}", _grnum, _dbehav, _dform, _dsoldiers, _group]

assuming the string in the stringtable has %1, %2 and so on scattered throughout it in the right places.   It's hard to see on the Code posted above.
Title: Re:Hint format localize
Post by: klavan on 16 May 2005, 12:15:29
Eheheh! None of your solutions were right, but mac's suggestion reminds me the traslation I've did for Un-Impossible Mission and a particular line of it's .csv. So I've de-PBOed the mission and found the solution:

hint format [localize "STRM_Stat_1", _grnum, _dbehav, _dform, _dsoldiers, _group]

Thank you guys.

PS.
@mac
About 3 weeks ago, after 27 (!!!) attempts, I completed it, but please don't make another mission like that no more! ;D


 
Title: Re:Hint format localize
Post by: macguba on 16 May 2005, 13:11:37
Well done klavan! :thumbsup:

Don't worry, the next one - Regina Proeliorum, which I hope will be released in about September/October, will be much easier.   You can do translation for that too if you like.  

*gets back on topic*

Told you I was crap at syntax.    ;D
Title: Re:Hint format localize
Post by: klavan on 16 May 2005, 17:47:25
Don't worry, the next one - Regina Proeliorum, which I hope will be released in about September/October, will be much easier.   You can do translation for that too if you like.  

Naturally!  ;)