RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
i can't figure out why i'm getting this error....

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
i have a window with the following code:
Spoiler for:
Code: [Select]
class Test_Menu_7 < Window_Base
  def initialize
    super(0, 0, 190, 80)
    refresh
  end
  def refresh
    for i in 0...3
      x = i*40
      y = i
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x, y)
    end
  end
end
and i keep getting this error:

Script 'Window_Base' line 113: NoMethodError occured.
undefined method 'blt' for nil:NilClass

the error is pointing to:
Spoiler for:
Code: [Select]
  #--------------------------------------------------------------------------
  # * Draw Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end

any ideas?
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Are you sure there are four party members in the party when you run the code?

***
Rep:
Level 88
yes there is, i'm just using the defaults, so i have Aluxes, Basil, Gloria, and Hilda.
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
You haven't defined self.contents.

Write this in initialize between super and refresh:

self.contents = Bitmap.new (width - 32, height - 32)

***
Rep:
Level 88
duuur...i hate it when i miss the little things! :-\
thanks!
"Facts are useless. You could use facts to prove anything that's even remotely true." Homer Jay Simpson

"I do not know what weapons WWIII will be fought with but i know WWIV will be fought with sticks and stones" Albert Einstein

"It's better to have loved and lost than never to have loved at all." from In Memoriam, by Alfred, Lord Tennyson.

"all your base are belonging to us!" awful fantasy 3

"the grapes damb it, it's alway's the grapes!"

Funny anagrams:
Desperation=A rope ends it
Mother in law=Woman hitler
Lottery machine=Money lost in 'em
Election results=Lies lets recount
Dormitory=Dirty room
Snooze alarms=Alas! No more Z's
Eleven plus two=Twelve plus one
Cosmetic surgery="Yes, I correct mugs."
The IRS=Theirs!
Public relations=Crap, built on lies
Astronomer=Moon starer
Dementia="Detain me."
Internet chat rooms=The moron interacts
The eyes!=They see!

Currently making:
http://rmrk.net/index.php/topic,13132.0.html