Author Topic: More strings than 12??  (Read 1823 times)

0 Members and 1 Guest are viewing this topic.

Offline Sami Tervo

More strings than 12??
« on: June 17, 2002, 09:01:47 AM »
in agistudio's help is written that you can have max 12 different strings (0-11 i assume).

i did a little bit of testing and found out that there wasn't no problem with 17 strings and all had 40 characters long text-string (except s0 ofcourse). and it only took 3 bytes from memory.

i think that i could use even more of strings than 17 but i keep wondering why peter kelly did put '12 max' to helpfile. is it a typo (perhaps 0 missing from end? so it would be 120?) or is game gonna crash somehow?

i haven't had time to test more, but if someone of you know, please share your knowledge. i really need every string, variable, flag etc. what i can get. aq isn't going to be a small game. thanks in advance.


Apocalyptic Quest [ http://apocalypticquest.cjb.net ] No Mutants Allowed [ http://www.nma-fallout.com ] Batmud [ http://www.bat.org ]

Offline Chris Cromer

Re:More strings than 12??
« Reply #1 on: June 17, 2002, 03:51:26 PM »
Well is this with my template? Because my template uses a different interpreter than his did and his may have had less strings available... well any once you find out how many max you can have I will update the help file with that number.
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline df

Re:More strings than 12??
« Reply #2 on: June 17, 2002, 04:47:51 PM »
there is two answers to this, old agi had 12, later agi had... 25? or 40? ack. i forget the number now. i think its something like 25...

Offline Chris Cromer

Re:More strings than 12??
« Reply #3 on: June 17, 2002, 05:02:56 PM »
Well the template that I distribute and is distributed with AGI Studio uses: 2.936 how many does this version have?
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Nick Sonneveld

Re:More strings than 12??
« Reply #4 on: June 17, 2002, 09:21:14 PM »
I just checked NAGI's source (which is generally a good indication of what happens in the original interpreter)

The "parse" command only parses strings from 0-11.. it just doesn't do anything if you ask anything else.  This is true for interpreters that have room for 24 strings too.

Things that don't check the limit (so using string 24+ could crash the interpreter):

- %s doesn't check for limit in messages
- get string
- set string
- word to string
- unknown 170 - setting a save name

Like df said.. I'm pretty sure there's only 12 strings in the older interpreters (because parse has a bounds check) but later interpreters had room for 24 (like NAGI does).  Each string is 40 characters in length. (40 char limit == screen width)

NAGI doesn't do any bounds checking either.. I better fix that eh? :)

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Sami Tervo

Re:More strings than 12??
« Reply #5 on: June 18, 2002, 07:42:38 AM »
whee =) 24 strings, that saved my day! great, i use agi mouse1.1 & nagi.
Apocalyptic Quest [ http://apocalypticquest.cjb.net ] No Mutants Allowed [ http://www.nma-fallout.com ] Batmud [ http://www.bat.org ]

Offline Nick Sonneveld

Re:More strings than 12??
« Reply #6 on: June 18, 2002, 10:03:01 AM »
Anyone else notice the similarity between the size of the strings and the screen dimensions?

40 characters wide, 24 strings high?

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.035 seconds with 22 queries.