subtledoctor Posted February 7, 2016 Posted February 7, 2016 Can it be used in an additive way to build a long string from numerous elements? SPRINT variable ~Hello~ SPRINT variable ~%variable% there,~ SPRINT variable ~%variable% good~ SPRINT variable ~%variable% sir!~ PRINT %variable% Will that print ~Hello there, good sir!~ ?
Wisp Posted February 7, 2016 Posted February 7, 2016 No, because that code won't parse. Secondly, it will print "variable" because %variable% is the string literal "variable". In the general sense, (OUTER_)SPRINT works like that, yes.
subtledoctor Posted February 7, 2016 Author Posted February 7, 2016 Yeah I know that was only psuedocode, but you get the idea. Thanks. For posterity, is the parsing error because it should be: SPRINT ~variable~ ~Hello~ SPRINT ~variable~ ~%variable% there,~...?
K4thos Posted February 7, 2016 Posted February 7, 2016 no, you forgot to enclose PRINT like this: PRINT ~%variable%~
Mike1072 Posted February 8, 2016 Posted February 8, 2016 The parsing error is because SPRINT is a patch and PRINT is an action. If you combined SPRINT with PATCH_PRINT or OUTER_SPRINT with PRINT, you'd be okay.
subtledoctor Posted February 8, 2016 Author Posted February 8, 2016 Oh yeah, got it. In my mod I'm actually using OUTER_SPRINT, I just shortened the psuedocode to save space. Thx for clarifying.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.