Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-22-2005, 07:49 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Adding to String List Implicitly

When you try to save a client or server flag as an array, it removes all values of 0.

Let's say you wanted to save an array: clientr.quest_dungeon = {1,0,0,0,0};
It would save as clientr.quest_dungeon=1.

clientr.quest_dungeon[2] would still return 0 as it doesn't exist.

However, you can't say clientr.quest_dungeon[2] = 1;
The flag saved removing the false values implicitly, but you can't add a flag value at an index implicitly, and that presents quite an obstacle in some cases.
You can plan on how many spaces in an array your quest would use, but if they're deleted for being 0, it's no use. Probably would have been better to use separate flags while cluttering the flag list.

I guess I can avoid this by doing string = "1,0,0,0,0"

Last edited by jake13jake; 12-22-2005 at 10:34 AM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.