Below is part of a imagemap using buttons to select pronoun options, and trying to call the function to select pronouns:
Code: Select all
hotspot( 66, 107, 16, 7) action SetVariable("pronoun", 0), Function(pronoun_selection(pronoun))
hotspot( 83, 107, 13, 7) action SetVariable("pronoun", 1), Function(pronoun_selection(pronoun))
hotspot( 97, 107, 10, 7) action SetVariable("pronoun", 2), Function(pronoun_selection(pronoun))
Code: Select all
default pronoun = 0
default pronounlist = [("they/them"),("she/her"),("he/him")]
default selectedpronouns = pronounlist[pronoun]
default theylist = [("they"),("she"),("he")]
default themlist = [("them"),("her"),("him")]
default theirlist = [("their"),("her"),("his")]
default theirslist = [("theirs"),("hers"),("his")]
default slist = [(""),("s"),("s")]
default eslist = [(""),("es"),("es")]
default arelist = [("are"),("is"),("is")]
default they = theylist[pronoun]
default them = themlist[pronoun]
default their = theirlist[pronoun]
default theirs = theirslist[pronoun]
default s = slist[pronoun]
default es = eslist[pronoun]
default are = arelist[pronoun]
init python:
def pronoun_selection(pronoun):
selectedpronouns = pronounlist[pronoun]
they = theylist[pronoun]
them = themlist[pronoun]
their = theirlist[pronoun]
theirs = theirslist[pronoun]
s = slist[pronoun]
es = eslist[pronoun]
are = arelist[pronoun]
return selectedpronouns
Any help would be wonderful!File "renpy/common/00action_other.rpy", line 578, in __call__
rv = self.callable(*self.args, **self.kwargs)
TypeError: 'str' object is not callable