Jump to content

Photo

Global Arrays


  • Please log in to reply
3 replies to this topic

#1 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 29 July 2008 - 05:58 PM

Basically, I've been working on a quest where I was trying to use global arrays to store information like whether cutscenes had been viewed or not. However, I seem to have hit a bit of a snag.

Whenever I first start the quest, I can access and change those arrays fine, but after I save, quit, and restart the quest... nothing with those arrays seems to work.

So, I was wondering what the limitations are on global arrays and how we can get around them.

Also, in the changelog, there was the following:
QUOTE
And finally, the additions of arrays to the scripting engine! Took a lot of work, but they're in. Now, each running script has the option via the global Declare() function to allocate for itself a block of memory. This block of memory is used as a scratch space for declaring and using arrays. One block is continually persistent as a 'global' memory and is used by default when an ffc or item script doesn't declare a piece of memory. Also included is a new section of memory in save files that allows you to store whatever miscellaneous data you like. ( jman2050, 2008-03-04 11:27:42 )


How exactly does the Declare() function work with arrays and saving to the save file?

Any help would be appreciated. icon_smile.gif

Edited by LinktheMaster, 29 July 2008 - 06:26 PM.


#2 Beefster

Beefster

    Human Being

  • Members
  • Real Name:Justin
  • Location:Colorado

Posted 29 July 2008 - 06:13 PM

The mention of Declare() in the changelog is extremely misleading. You declare arrays just as you would in C++. I've never had problems with it.

#3 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 29 July 2008 - 06:27 PM

Good thing you remembered it... for some reason it didn't put the quote in there. icon_frown.gif

But, I honestly can't think of any reason why it would work before quitting, but not after.

#4 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 29 July 2008 - 11:25 PM

QUOTE(LinktheMaster @ Jul 29 2008, 04:27 PM) View Post

Good thing you remembered it... for some reason it didn't put the quote in there. icon_frown.gif

But, I honestly can't think of any reason why it would work before quitting, but not after.


It's a bug. I've seen it also. Slightly annoying.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users