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

Topics - (deleted)

#1
AGS Games in Production / (deleted)
Mon 15/06/2015 08:34:19
(deleted)
#2
General Discussion / (deleted)
Wed 29/02/2012 00:23:47
(deleted)
#3
Completed Game Announcements / (deleted)
Mon 23/01/2012 05:09:52
(deleted)
#4
AGS Games in Production / (deleted)
Sat 15/10/2011 10:26:28
(deleted)
#5
Completed Game Announcements / (deleted)
Wed 18/05/2011 20:28:06
(deleted)
#6

Rules:
Please illustrate a man and use only shades of grey. In keeping with the spirit inherent to this competition, please do not alter the outline (redundant though it may be in several places).
#7
Adventure Related Talk & Chat / (deleted)
Wed 03/11/2010 23:20:32
(deleted)
#8
Advanced Technical Forum / Table Overflow
Fri 03/07/2009 09:17:02
Mid-way through a productive work session on a project that is [quite painfully] near completion, I encountered a hitch when attempting to compile a build for beta test purposes.

"Internal compiler error: table overflow"

This error is perhaps related to the difficulties explored in the following thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34580.0

However - it differs in these ways.
I'm using AGS 3.1.2 (Wasn't there a fix in 3.0.1 that addressed a table overflow in the Global Script? Is this related?)

Also, the last word on this error was from CJ himself, advising

Quote
"to create a script module and move some of your code into that,"

which I was quick to do. Still,  the error persists.

All of the global variables are implemented using the Global Variables Pane, and they number about 500-600. Am I pushing it?

Many other local variable symbols are used liberally throughout the code, but in ways that I've assumed are safe.

//==== Bottom Line: ===== //
1. Is there a concrete limit on variable symbols in AGS? If so - I don't think I'd be even coming close to it, without faulty scripting.

2. What manner of faulty scripting could cause a "Table Overflow" anyway?

2. Oh my god help. This project is almost done - if I have to bin the project, I'm disappearing into the woods forever.
#9
(After studying previous forum posts regarding this dilemma, it seems to become apparent that this question merits a new topic)

What I'm attempting to accomplish is a function which searches through the contents of a list box to see if a string of text exists there, or not. The ideal function would accommodate the list box's total item number changing.

For example, if the player has Goo in his inventory, the function (located in repeatedly_execute) would update the list box with an entry called "Goo Listbox Text." I've used the term contents in the code below:

Code: ags

function repeatedly_execute() 
{

   if (player.InventoryQuantity[Goo.ID] != 0){         // PLAYER'S GOT THE GOO.
       if (listbox.contents != ("Goo Listbox Text"))  // NO GOO ENTRY IN LIST BOX?
       listbox.AddItem("Goo Listbox Text");}         // ADD LISTBOX ENTRY
   }

}


...so right now, uhh... I'm stumped.

I've tried a few approaches which result in the "INVALID INDEX NUMBER" error, and others which depend on the  listbox.ItemCount remaining the same (so I can check each slot, numerically) - but as I mentioned earlier, the total number of items in the list box changes, so checking via "listbox.items#" won't work, since the index number needs to accommodate a variable total.

Is there, perhaps, a way to convert a list box's contents to a series of strings, which can be checked? ...this is all so daunting.

Here's another example, which I've tried. It results in the game hanging - eternal loop style - and I get the error: "Script appears to be hung in GlobalScript etc"

Code: ags


int TotalNumber;

while (TotalNumber == Listbox.ItemCount -1) {
 if ((Listbox.Items[TotalNumber] != "Goo Listbox Text")  &&  (player.InventoryQuantity[Goo.ID] !=0 ))
   {Menu.AddItem("Goo Listbox Text");}
 else {}
}



I'm absolutely sure there's a head-slappingly simple way of reaching a solution, so come on, you dogs. You have full permission to make me look like an incapable dunce.
#10
AGS Games in Production / (deleted)
Sun 13/07/2008 14:34:49
(deleted)
#11
Completed Game Announcements / The Jackyard
Sun 01/06/2008 17:34:58
(deleted)
SMF spam blocked by CleanTalk