My file crashed... Doesn't appear to be the code. What's wrong?

Started by cjoleary, Mon 30/03/2009 11:46:31

Previous topic - Next topic

cjoleary

I added functionality to my project that would have allowed the game to start with an inventory item, in the syntax of my game an ability, that would repair a broken object when used on it. But the game won't even run. I commented out all the new code but it still wouldn't work. What could be the potential problems?

I would attach my file but I can't find the attach option in advanced.

Code: ags
<?php phpinfo(); ?>// room script file
int lighta_fixed=0;
function Light1_Look(){
 if (lighta_fixed==0)
  {
  player.Say("My God. It's useless...");
  }
 if (lighta_fixed==1)
  {
  player.Say("Finally, some illumination...");
  }
return;
}

function Light1_Interact()
 {
  if (player.InventoryQuantity[BulbFix.ID]==1)
   {
   player.Say("I can fix this");
   Light1.Graphic = 10;
   lighta_fixed=1;
   }
return;
}

Gilbert

Are the functions linked properly to the events of the "Light" entity (be it an object or an inventory item, from the context of your problem I guess it is an object)?

You cannot just add random functions in the room script and wish them to be executed automagically, just click the 'event' button (the one with a lightning icon) of that entity's menu on the right and check.

SMF spam blocked by CleanTalk