creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
String/Number Mess   
Papriko
Peppery One

Papriko
Germany  


  3/12/2010

Hi there,
I have 2 questions and want to make it short:

1. Catalogue files usually contain strings. Can I also write numeric values in it or will the engine start an error-carpet-bombing on me?

2. When I know that a string actually just contains a number (reasons are less important yet), how can I transform it from a string back to a numeric value?


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Moe

Moe


 visit Moe's website: Creatures 2 to Docking Station
  3/12/2010

STOI command.

If I recall off the top of my head, that's the "string to integer" command.

setv [variable] STOI [known numerical string variable]


I don't know about storing numbers in Catalogue files as I don't know the manner in which you intend to do so and have not specifically tested it, but I see no reason why it would freak the engine out.

Numbers can be strings in the engine, and I don't see why Catalogue files would be different.

 
Papriko
Peppery One

Papriko



  3/15/2010

Yup, that with STOI worked good. Thank you a lot ^^

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki