How to change value of a node field after a webform is submitted? I have a content type "items" with a Select list field with the options 0|Free and 1|Reserved.

I am trying to change the fields value from 0 (default) to 1 when a certain webform is submitted (the webform gets the Nid from the url).

For this I have made (and enabled) a custom module (by following a tutorial I found) with the code below:

function reservable_item_change_status_webform_submission_insert($node,$submission) {
  if($node-&gt;nid == 5){ //my webform has an id of 5
    $nodeID = $submission-&gt;data[3]['value']['0'];
    $reservableItem = node_load($nodeID);
    if($reservableItem -&gt;type == 'items'){
      $reservableItem-&gt;field_item_status['und'][0]['value'] = 1;
      node_save($reservableItem);
    }
  }
}


My problem is that nothing is happening. No errors, but the field status is not being changed to reserved.

I am using Webform version 3.2 because the tutorial stated it was meant for Webform 3.x. I will test with 4.x after I get this working.

Any help would be greatly appreciated.
If typo:

if($reservableItem -&gt;type == 'items'){


change into: 

if($reservableItem-&gt;type == 'items'){


In my implementation I get the submission values like:

$submission-&gt;data[3][0]


So try to change it accordingly