subtledoctor Posted February 7, 2016 Share 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!~ ? Link to comment
Wisp Posted February 7, 2016 Share 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. Link to comment
subtledoctor Posted February 7, 2016 Author Share 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,~...? Link to comment
K4thos Posted February 7, 2016 Share Posted February 7, 2016 no, you forgot to enclose PRINT like this: PRINT ~%variable%~ Link to comment
subtledoctor Posted February 7, 2016 Author Share Posted February 7, 2016 Yes, that was the 2nd problem. Link to comment
Mike1072 Posted February 8, 2016 Share 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. Link to comment
subtledoctor Posted February 8, 2016 Author Share 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. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.