String: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>StDoodle
mNo edit summary
Line 3: Line 3:
{{Primitive|Name={{#var:name}}}}
{{Primitive|Name={{#var:name}}}}
==Concatenating Strings==
==Concatenating Strings==
<code>
{{CodeSample|
  [[print()|print]]("My base muscle: " + [[my_basestat()|my_basestat]]($[[stat]][muscle]));
code=
  [[print()|print]]("My base moxie: " + [[my_basestat()|my_basestat]]($[[stat]][moxie]));
<syntaxhighlight>
  [[print()|print]]("My base mysticality: " + [[my_basestat()|my_basestat]]($[[stat]][mysticality]));
print("My base muscle: " + my_basestat($stat[muscle]));
  [[comments|// To grab your base main stat, you can:]]
print("My base moxie: " + my_basestat($stat[moxie]));
  [[print()|print]]("My base main stat: " + [[my_basestat()|my_basestat]]([[my_primestat()]]));
print("My base mysticality: " + my_basestat($stat[mysticality]));
  [[comments|// To grab substats, you can:]]
// To grab your base main stat, you can:
  [[print()|print]]("My current muscle substats: " + [[my_basestat()|my_basestat]]($[[stat]][submuscle]));
print("My base main stat: " + my_basestat(my_primestat()));
</code>
// To grab substats, you can:
print("My current muscle substats: " + my_basestat($stat[submuscle]));
</syntaxhighlight>}}

Revision as of 05:23, 2 March 2010

{{#customtitle:string|string}} Template:Primitive

Concatenating Strings

print("My base muscle: " + my_basestat($stat[muscle]));
print("My base moxie: " + my_basestat($stat[moxie]));
print("My base mysticality: " + my_basestat($stat[mysticality]));
// To grab your base main stat, you can:
print("My base main stat: " + my_basestat(my_primestat()));
// To grab substats, you can:
print("My current muscle substats: " + my_basestat($stat[submuscle]));