title: Error: Conversion to non-scalar type requested
body: <p>I'm having a small problem trying to malloc this struct.
  Here is the code for the structure:</p>
  
  <pre><code>typedef struct stats {                  
      int strength;               
      int wisdom;                 
      int agility;                
  } stats;
  
  typedef struct inventory {
      int n_items;
      char **wepons;
      char **armor;
      char **potions;
      char **special;
  } inventory;
  
  typedef struct rooms {
      int n_monsters;
      int visited;
      struct rooms *nentry;
      struct rooms *sentry;
      struct rooms *wentry;
      struct rooms *eentry;
      struct monster *monsters;
  } rooms;
  
  typedef struct monster {
      int difficulty;
      char *name;
      char *type;
      int hp;
  } monster;
  
  typedef struct dungeon {
      char *name;
      int n_rooms;
      rooms *rm;
  } dungeon;
  
  typedef struct player {
      int maxhealth;
      int curhealth;
      int mana;
      char *class;
      char *condition;
      stats stats;
      rooms c_room;
  } player;
  
  typedef struct game_structure {
      player p1;
      dungeon d;
  } game_structure;
  </code></pre>
  
  <p>And here is the code I'm having a problem with:</p>
  
  <pre><code>dungeon d1 = (dungeon) malloc(sizeof(dungeon));
  </code></pre>
  
  <p>It gives me the error "error: conversion to non-scalar type requested"
  Can someone help me understand why this is?</p>