Imagemapping Help

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
undertone09
Newbie
Posts: 10
Joined: Sat Jul 11, 2009 3:40 pm
Contact:

Imagemapping Help

#1 Post by undertone09 »

I can't get the imagemapping for the main menu to work.

Here is my code

Code: Select all

init -2 python:
    layout.imagemap_main_menu("mainmenu,jpg", [
        (165.1, 55.6, 191.3, 66.7, "Start Game"),
        (165.6, 74.3, 194.5, 88.6, "Load Game"),
        (165.9, 93.7, 196.3, 104.8, "Extra"),
        (156.6, 107.4, 190, 121.7, "Quit"),
        ])
And here is the traceback error

Code: Select all

I'm sorry, but an exception occured while executing your Ren'Py
script.

TypeError: imagemap_main_menu() takes exactly 3 arguments (2 given)

While executing init code:
 - script at line 267 of C:\Users\Jordan\Desktop\Apps\renpy-6.9.2\The Game/game/options.rpy
 - python at line 272 of C:\Users\Jordan\Desktop\Apps\renpy-6.9.2\The Game/game/options.rpy.

-- Full Traceback ------------------------------------------------------------

  File "C:\Users\Jordan\Desktop\renpy-6.9.2\renpy\bootstrap.py", line 255, in bootstrap
  File "C:\Users\Jordan\Desktop\renpy-6.9.2\renpy\main.py", line 253, in main
  File "C:\Users\Jordan\Desktop\renpy-6.9.2\renpy\execution.py", line 230, in run
  File "C:\Users\Jordan\Desktop\renpy-6.9.2\renpy\ast.py", line 558, in execute
  File "C:\Users\Jordan\Desktop\renpy-6.9.2\renpy\python.py", line 921, in py_exec_bytecode
  File "C:\Users\Jordan\Desktop\Apps\renpy-6.9.2\The Game/game/options.rpy", line 272, in <module>
TypeError: imagemap_main_menu() takes exactly 3 arguments (2 given)

While executing init code:
 - script at line 267 of C:\Users\Jordan\Desktop\Apps\renpy-6.9.2\The Game/game/options.rpy
 - python at line 272 of C:\Users\Jordan\Desktop\Apps\renpy-6.9.2\The Game/game/options.rpy.

Ren'Py Version: Ren'Py 6.9.2a
If you can't tell, I'm not very good with programming code. What argument am I missing?
Thank you

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Imagemapping Help

#2 Post by JQuartz »

I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Mew151
Newbie
Posts: 10
Joined: Thu Jul 16, 2009 8:13 pm
Projects: Unbeatable Battles (Pre-production)
Contact:

Re: Imagemapping Help

#3 Post by Mew151 »

It's because you haven't a hover image.

If you don't want anything to change, just post the same image like this:

Code: Select all

init -2 python:
    layout.imagemap_main_menu("mainmenu.jpg", "mainmenu.jpg", [
        (165.1, 55.6, 191.3, 66.7, "Start Game"),
        (165.6, 74.3, 194.5, 88.6, "Load Game"),
        (165.9, 93.7, 196.3, 104.8, "Extra"),
        (156.6, 107.4, 190, 121.7, "Quit"),
        ])
Also note that you put a comma in "mainmenu.jpg" instead of a period. :wink:

Post Reply

Who is online

Users browsing this forum: No registered users