Gwyrdain / apprentices-workshop

Creative Commons Zero v1.0 Universal
5 stars 2 forks source link

Error creating container #160

Open Cordir opened 7 years ago

Cordir commented 7 years ago

I don't know if this is monitored or not, but I was working in the Workshop today, making an object, and got this error when I tried to save:

NoMethodError in Objs#create Showing /app/app/views/objs/_formobjvalues.html.erb where line #509 raised:

undefined method `>' for nil:NilClass Extracted source (around line #509): 506 507 508 509 510 511 512

  </div>

  <% @area.objs.exists?(:id => @obj.v2)      ? $LocalKeyVnumRadio = true : $LocalKeyVnumRadio = false %>
  <% @obj.v2 > (@obj.area.vnum_qty - 1) ? $ExternalKeyVnumRadio = true : $ExternalKeyVnumRadio = false %>
  <% !$LocalKeyVnumRadio && !(@obj.v2 > (@obj.area.vnum_qty - 1))     ? $BadKeyVnumRadio = true : $BadKeyVnumRadio = false %>

Trace of template inclusion: app/views/objs/_form.html.erb, app/views/objs/new.html.erb

Rails.root: /app

Application Trace | Framework Trace | Full Trace app/views/objs/_formobjvalues.html.erb:509:in _app_views_objs__formobjvalues_html_erb__1250758680773789283_70053741003260' app/views/objs/_form.html.erb:82:inblock in _app_views_objsform_html_erb3611759868271223014_70053749780520' app/views/objs/_form.html.erb:1:in _app_views_objs__form_html_erb__3611759868271223014_70053749780520' app/views/objs/new.html.erb:14:in_app_views_objs_new_html_erb__244558055106728465_70053750080260' app/controllers/objs_controller.rb:96:in `create' Request

Parameters:

{"utf8"=>"✓", "authenticity_token"=>"Doei7KxLwlPa2N6y95Fa5xzq2NrBTRT48gJH17EJC40=", "obj"=>{"vnum"=>"07", "keywords"=>"chest", "sdesc"=>"a small iron coffer", "ldesc"=>"Marred by rust, a narrow iron coffer keeps meager treasures safe.", "object_type"=>"15", "v0"=>"11", "v1"=>"13", "v3"=>"0", "takeable"=>"0", "glow"=>"0", "hum"=>"0", "evil"=>"0", "invis"=>"0", "magic"=>"0", "nodrop"=>"0", "anti_good"=>"0", "anti_evil"=>"0", "anti_neutral"=>"0", "noremove"=>"0", "inventory"=>"0", "metallic"=>"0", "good"=>"0", "not_purgable"=>"0", "flammable"=>"0", "two_handed"=>"0", "use_cost"=>"0", "anti_unalign"=>"0", "neutral"=>"0", "no_hoard"=>"0", "masked"=>"0", "underwater_breath"=>"0", "wear_flags"=>"0", "weight"=>"1", "cost"=>"0"}, "obj_capacity"=>"10", "ContainerKeyVnumRadioOptions"=>"1", "commit"=>"Create Obj", "area_id"=>"74"}