Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - shamz

#21
I wrote a custom function intended to add an Inventory item to the player while also notifying that the item has been added.

Code: ags

function Notify(InventoryItem*item){ //not the best function name but I'll change that later
  AddedInv.Text = item.Name;
  player.AddInventory(item);
  gNotification.Transparency = 100;
  gNotification.Visible = true;
  while (gNotification.Transparency >= 10){
    gNotification.Transparency -= 10;
    Wait(1);
  }
  gNotification.Transparency = 0;
  WaitMouseKey(1000);
  while (gNotification.Transparency <= 90){
    gNotification.Transparency += 10;
    Wait(1);
  }
  gNotification.Visible = false;
}


In the header of GlobalScript I imported the function like this:

Code: ags

import function Notify(InventoryItem);


However, when I run the game I get this error:
Parameter type does not match prototype

Now I am new to using pointers and I don't have a lot of experience writing my own functions. I'm guessing I imported the function wrong or I used pointers incorrectly.
#22
Sorry for the late reply, but apparently AGS was having problems reading the sprite. I'm not sure where the problem was exactly, but I reimported the sprite and it worked.

Thanks for your help :)
#23
Sure thing :) I can't find a method to upload anything to the forums though, so I just put it on file dropper. I hope that's okay. Here's the link: http://www.filedropper.com/crashinfo3330
#24
Hi, I'm new to AGS. I keep getting this bug when the player character changes room, the game crashes and the following message comes up:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00451A78 ; program pointer is +72, ACI version 3.3.3.0, gtags (0,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

Can anybody tell me where the problem is?
SMF spam blocked by CleanTalk