Out of date coding (FIXED)

Started by ShadeJackrabbit, Fri 23/12/2005 19:31:18

Previous topic - Next topic

ShadeJackrabbit

Okay, I am working on my adventure game using the LEC (LucasArts Style) GUI, and when I try to run it, it gives me the following error:

EDIT:It now works! I'd like to thank everybody who helped to get this game running.

Akumayo

What version of AGS are you using?  That, we need to know to really fix the problem, but try this anyway:

Replace:
Code: ags

      if (character[ GetPlayerCharacter() ].ActiveInventory >= 0)
        SetCursorMode(4);


With:
Code: ags

      if (player.ActiveInventory.ID >= 0) {
        Mouse.Mode = 4;
      }


I think that'll fix it if your using an up-to-date version.
"Power is not a means - it is an end."

ShadeJackrabbit

#2
Thanks! That worked!!! Guess I was using an out-of-date GUI huh? Thanks again!

EDIT:
Great now I got another problem! If I try to look at the inventory, it crashes and gives the following error: FIXED
Quote from: AGS
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0041D7A2 ; program pointer is +6, ACI version 2.70.864, gtags (73,24)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

Akumayo

Hrm... Looks odd.Ã,  Try replacing the integer "4" in this bit:
Code: ags

Mouse.Mode = 4;


To the name of the cursor you're using, like eModeLook, or eModeInventory, or whatever cursor you're using as number 4.

If that doesn't work, I'm not sure what to do.
"Power is not a means - it is an end."

ShadeJackrabbit

#4
No... That doesn't work. I guess I'll contact CJ then.
Wait... who's CJ? Oh, right. Chris Jones.
How do I contact him?

Akumayo

I wouldn't contact him directly, rather, copy the error message from this post, and make a new post in the Technical Forum (not Technical Archive) containing the error and when it happens.
"Power is not a means - it is an end."

Candle

Here is a rotn template that will work with 2.71 626 + above

http://www.xtrafile.com/uploads/2b84b26ffe.zip.html

ShadeJackrabbit

#7
Oh great, now there's another error:
FIXED
Code: ags

---------------------------
Compile Error
---------------------------
There was an error compiling your script. The problem was:
In: 'Global script'
Error (line 58): Undefined token 'show_inventory_window' 


Here's the general area:
Code: ags

function interface_click(int interface, int button) {
  if (interface == ICONBAR) {
    if (button == 4) {  // show inventory
      show_inventory_window();
    }

Just getting the  game to work seems to be the hard part eh?

Gilbert

Did you comment out or removed the show_inventory_window() function codes from the global script?

ShadeJackrabbit

I don't know what comment out means, but I didn't remove show_inventory_window() function codes from the script.

Akumayo

Did you download the template for the newer version that GBC linked?  I'll bet that'd solve all your problems with errors.
"Power is not a means - it is an end."

ShadeJackrabbit

This problem IS with the new template.

Akumayo

Ahh, found your problem  :D
Replace:
Code: ags

show_inventory_window();


With:
Code: ags

InventoryScreen();


That oughta patch it up real nice.
"Power is not a means - it is an end."

Elliott Hird

Default Inv...Screen is evil.

ShadeJackrabbit

I'll try that when It's not christmas day.

Elliott Hird


ShadeJackrabbit

CJ doesn't let you use AGS on Chrstmas Day. it's part of the program.

Elliott Hird

*cough*double click time in windows systray, change date*cough*

ShadeJackrabbit

#18
Okay, now I got another "Undefined Token" this one's called "save"

Code: ags

    else if (button == 6)    // save game
      Save();

FIXED
I think I should start learning the AGS language. This is getting real annoying.

Gilbert

You should really start reading documents than throwing in random function names. :P

SMF spam blocked by CleanTalk