CJ,
Got a major problem happening with my game. I keep getting this error code
---------------------------
Adventure Game Studio
---------------------------
An internal error has occured. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 2.70.861)
Error: Out of memory: failed to allocate -492 bytes (at PP=155)
---------------------------
OK
---------------------------
I haven't changed the code for this room or the global script and it previously worked perfectly. I've tracked it down to a portion of the code where this crash is caused but I can't see why it would happen, as I said nothing's been changed. Thanks for your help!
Klytos
Here's the code for the room (it's in the first time a player enters screen dialog)...
int job=Random(3);
Wait(20);
StopMoving(EGO);
character[BADDY].room = character[EGO].room;
character[BADDY].x = 87;
character[BADDY].y = 93;
PlaySound(5);
AnimateCharacterEx(BADDY, 4, 0, 0, 0, 1);
ReleaseCharacterView(BADDY);
FaceCharacter(BADDY, EGO);
Wait(100);
// *************************************************************
// THIS IS WHERE THE PROBLEM OCCOURS, WHEN THE RANDOM INT KICKS IN...
if (job == 0) {
DisplaySpeech(BADDY, "&1 What are you doing out here?");
SetGlobalInt(1, 1);
SetGlobalInt(3, 0); }
if (job == 1) {
DisplaySpeech(BADDY, "&2 That's it! You're dead meat!");
SetGlobalInt(1, 1);
SetGlobalInt(3, 1); }
else if (job == 2) {
DisplaySpeech(BADDY, "&3 Die you little tree-hugger!");
SetGlobalInt(1, 1);
SetGlobalInt(3, 2); }
else if (job == 3) {
DisplaySpeech(BADDY, "&4 Fuck off you little shit!");
SetGlobalInt(1, 1);
SetGlobalInt(3, 3); }
// *************************************************************
// *************************************************************
SetGlobalInt(2, 1);
Wait(10);
PlaySound(6);
AnimateCharacterEx(BADDY, 4, 0, 0, 1, 1);
Wait(1);
character[BADDY].room = -1;
PlayMusic(6);