Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Objects problem  (Read 6083 times)

0 Members and 1 Guest are viewing this topic.

Adventureforall

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 26
  • I'm a llama!
    • View Profile
Objects problem
« on: June 04, 2003, 12:27:02 PM »

Now i'm trying to but my first scene together, i ad the first object "Wallet" to the scene, and it works perfectly, when i take it, the icoon change and i can put it in the inventory, now the problem comes, i put an second object in the screen "handcuffs" the handcuffs works perfectly, but when i'm pick up the wallet i got an "script error" the wallet disapeers from the scenen, but the icoon won't change and it isn't placed in my inventory.

this is a copy of the log file :

13:12: ********** DEBUG LOG OPENED 04-06-2003 (Release Build) *****************
13:12: DEAD:CODE Games Framework ver 1.00 (Build 25), Compiled on Apr 21 2003, 16:54:22
13:12: Platform: Windows XP  (Build 2600)
13:12: DirectX version: 9.0
13:12: BugslayerUtil.dll is bound
13:12:
13:12: Scanning packages...
13:12:   Registered 0 files in 0 package(s)
13:12: Initializing scripting engine...
13:12:   Script compiler 'dcscomp.dll' bound successfuly
13:12: Loading string table...
13:12:   0 strings loaded
13:12: Enumerating Direct3D devices...
13:12: Enumerating DirectDraw devices...
13:12: Enumerating DirectSound devices...
13:12: Available video devices:
13:12:   ASUS V8200 Series v31.40H (accelerated)
13:12:   ASUS V8200 Series v31.40H (non accelerated)
13:12: Available audio devices:
13:12:   Primair geluidsstuurprogramma
13:12:   SB Audigy Audio [FFE0]
13:12:   [no sound]
13:12:
13:12: User selected:
13:12:   Video: ASUS V8200 Series v31.40H (accelerated)
13:12:          Windowed:no  Colors:32bit  T&L:no  Multisample:0
13:12:   Audio: Primair geluidsstuurprogramma
13:12: Maximum texture size: 4096x4096
13:12: Error opening file 'items\handcuffs.scrips'
13:12: CScEngine::GetCompiledScript - error opening script 'items\handcuffs.scrips'
13:12: Data initialized in 105 ms
13:12: Runtime error. Script 'scenes\drawer_sleepingroom\scr\wallet.script', line 19
13:12:   Cannot add item 'wallet' to inventory
13:12:
13:12: Shutting down...
13:12: Shutting down scripting engine
13:12: ********** DEBUG LOG CLOSED ********************************************

this is a copy of the items.items :

ITEM
{
   CURSOR_COMBINED = TRUE
   CAPTION = "wallet"
   NAME = "wallet"
   IMAGE = "items\wallet_klein.bmp"
   CURSOR = "items\wallet_klein.bmp"
   CURSOR_HOVER = "items\wallet_klein.bmp"
   SCRIPT = "items\wallet.script"


   CURSOR_COMBINED = TRUE
   CAPTION = "handcuffs"
   NAME = "Handcuffs"
   IMAGE = "items\handboeien_klein.bmp"
   CURSOR = "items\handboeien_klein.bmp"
   CURSOR_HOVER = "items\handboeien_invent.bmp"
   SCRIPT = "items\handcuffs.scrips"
}


And this is a copy of wallet.script
#include "scripts\base.inc"


////////////////////////////////////////////////////////////////////////////////
on "LookAt"
{
  GoToObject();
  actor.Talk("It's my wallet, my police badge is in it.");
}


////////////////////////////////////////////////////////////////////////////////
on "Take"
{
  GoToObject();
  actor.Talk("Good idea, i need my badge to identify myself.");
 
// hide the wallet entity and place "wallet" item into the inventory
   Game.TakeItem("wallet");
   var Entwallet = Scene.GetNode("wallet");
   Entwallet.Active = false;

   Game.SelectedItem = "wallet";

}


////////////////////////////////////////////////////////////////////////////////
on "Talk"
{
  GoToObject();
  actor.Talk("That's a good idea, i'm going to talk to my wallet. Are you crazy ??!!");
 
}


////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
  GoToObject();
}


////////////////////////////////////////////////////////////////////////////////
function GoToObject()

{
  actor.GoTo();
  actor.TurnTo(DI_UP);
}


Can any one please help me, i'm trying the figure it out for 4 hours now, and i don't see where the problem is caused.
Logged

Adventureforall

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 26
  • I'm a llama!
    • View Profile
Re:Objects problem
« Reply #1 on: June 04, 2003, 12:29:04 PM »

here's all so a copy of the "handcuffs.script"

#include "scripts\base.inc"


////////////////////////////////////////////////////////////////////////////////
on "LookAt"
{
   GoToObject();
   actor.Talk("Blah");
}


////////////////////////////////////////////////////////////////////////////////
on "Take"
{
   Game.SelectedItem = "handcuffs";
}


////////////////////////////////////////////////////////////////////////////////
on "Talk"
{
  GoToObject();
  actor.Talk("Blah");
}


////////////////////////////////////////////////////////////////////////////////
on "LeftClick"
{
  GoToObject();
}


////////////////////////////////////////////////////////////////////////////////
function GoToObject()
{
  actor.GoTo(200, 200);
  actor.TurnTo(DI_UP);
}
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Objects problem
« Reply #2 on: June 04, 2003, 01:01:07 PM »

Hi, the problem is here:

Quote
13:12: Error opening file 'items\handcuffs.scrips'

The engine is unable to open the file, there's probably a misspelling in the filename, "scrips" instead of "script".
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Adventureforall

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 26
  • I'm a llama!
    • View Profile
Re:Objects problem
« Reply #3 on: June 04, 2003, 01:13:27 PM »

I  have fond the problem

ITEM
{
  CURSOR_COMBINED = TRUE
  CAPTION = "wallet"
  NAME = "wallet"
  IMAGE = "items\wallet_klein.bmp"
  CURSOR = "items\wallet_klein.bmp"
  CURSOR_HOVER = "items\wallet_klein.bmp"
  SCRIPT = "items\wallet.script"
}

ITEM
{
 CURSOR_COMBINED = TRUE
  CAPTION = "handcuffs"
  NAME = "Handcuffs"
  IMAGE = "items\handboeien_klein.bmp"
  CURSOR = "items\handboeien_klein.bmp"
  CURSOR_HOVER = "items\handboeien_invent.bmp"
  SCRIPT = "items\handcuffs.scrips"
}

I had to put } behind script=
Logged

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re:Objects problem
« Reply #4 on: June 04, 2003, 01:23:33 PM »

hi,

you found it while i was already answering you. :)
anyway there is a second one:

ITEM
{CURSOR_COMBINED = TRUE
  CAPTION = "handcuffs"
  NAME = "Handcuffs"
  IMAGE = "items\handboeien_klein.bmp"
  CURSOR = "items\handboeien_klein.bmp"
  CURSOR_HOVER = "items\handboeien_invent.bmp"
  SCRIPT = "items\handcuffs.scrips"
}

are you sure about the script name ? :) ("scrips")

Logged
Mooh!

Adventureforall

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 26
  • I'm a llama!
    • View Profile
Re:Objects problem
« Reply #5 on: June 04, 2003, 01:24:43 PM »

scrips, was a little typing problem in this forum  :-\
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Objects problem
« Reply #6 on: June 04, 2003, 01:29:46 PM »

Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re:Objects problem
« Reply #7 on: June 04, 2003, 01:53:34 PM »

@mnemonic:
I didn't even see your answer... it's a problem writing answers while working. That way I need 30 minutes for a message and when I'm done, others already answered everything. :)
« Last Edit: June 04, 2003, 01:53:57 PM by Jerrot »
Logged
Mooh!
 

Page created in 0.022 seconds with 20 queries.