Author Topic: FormatPrint Kernel  (Read 3942 times)

0 Members and 1 Guest are viewing this topic.

Offline robingravel

FormatPrint Kernel
« on: January 14, 2004, 05:33:15 PM »
Hi folks

In controls.sc
Quote
(procedure public (FormatPrint textorstring textid view loop cel params)
 (var temps[500])
 (if(<u textorstring 1000)
  Format(@temps textorstring textid rest params)
 )(else
  Format(@temps rest textorstring)
 )
 Print(@temps #icon view loop cel)
)

In room game:
Quote
FormatPrint("Grostesteing. Tu es condamne a %d ans de prison. La soif de la conquete de Grostesteing se termine ici." prison1 73 2 0)

My code works.



I which to add #title in FormatPrint kernel but I don't know how.

I used FormatPrint because I used a variable.

Thanks in advance



Robin Gravel



Offline Robert Eric

Re:FormatPrint Kernel
« Reply #1 on: January 14, 2004, 09:36:32 PM »
Code: [Select]
Format(strText "Grostesteing. Tu es cond*mne a %d ans de prison. La soif de la conquete de Grostesteing se termine ici." prison1 73 2 0)
Print(strText #title)

Something like that, I think.  Use format to create the string that will hold the string with variables, then use Print to display the string using the #title parameter.  Try that.  

Offline Cloudee1

Re:FormatPrint Kernel
« Reply #2 on: January 14, 2004, 10:52:14 PM »
Doesn't 31 years seem a little long, I'll miss ya  :'(
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline robingravel

Re:FormatPrint Kernel
« Reply #3 on: January 14, 2004, 11:36:59 PM »
I made a new game to check Robert's code.

It works but I got Oops message and the game quits. I guess something's missing.

To Cloudee1: 31 is the variable's value. The variable may change
depending Grostesteing has done for bad. It may vary from 1 to 68.


Robin Gravel

Offline Robert Eric

Re:FormatPrint Kernel
« Reply #4 on: January 15, 2004, 04:03:14 PM »
Code: [Select]
Format(strText "Grostesteing. Tu es cond*mne a %d ans de prison. La soif de la conquete de Grostesteing se termine ici." prison1 73 2 0)
Print(strText #title)

You have one %d and four variables after it.  That might be the problem.  Did you add your own title after #title?  It should read like '#title "sometext"',  sometext being your title.
« Last Edit: January 15, 2004, 04:04:22 PM by Robert Eric »

Offline robingravel

Re:FormatPrint Kernel
« Reply #5 on: January 15, 2004, 05:05:31 PM »
Thanks Robert


I changed the code in controls.sc:
Quote
(procedure public (FormatPrint textorstring textid params)
 (var temps[500])
 (if(<u textorstring 1000)
  Format(@temps textorstring textid rest params)
 )(else
  Format(@temps rest textorstring)
 )
 Print(@temps)
)


And I used this code in room1:
Quote
Format(strText"Grostesteing. Tu es condamne a %d ans de prison. La soif de la conquete de Grostesteing se termine ici." prison1)
   Print(strText #title"Sergeant Flint" #icon 73 2 0)

It works in a new game but I still get Oops message in the game I'm working "Grostesteing: plus m

Offline robingravel

Re:FormatPrint Kernel
« Reply #6 on: January 15, 2004, 11:04:36 PM »
Thanks again Robert


Everything's working in my game. I'm going to release this newest
version to my site tomorrow.


Robin Gravel

Offline Eero R

Re:FormatPrint Kernel
« Reply #7 on: January 16, 2004, 06:42:55 AM »
Sounds like an interesting game... Too bad it's only in French.
Persona grata ego sum...

Offline Cloudee1

Re:FormatPrint Kernel
« Reply #8 on: January 17, 2004, 05:46:51 AM »
Hey robin why did you add new french verbs to the vocab list instead of just adding them to their english counterpart, ie. observer add to look.  le add to the. parler add to talk :-\

At least then us self-centered english speakers only who think that everything should be done in english because that's what we speak, might have at least a chance to muddle through the game, If you were to continuosly use the same vocab resource in other projects then it might prove to be beneficial in the long run to have one list with both words set as similes, once it's done, it's done kind of thing.  ;)

I can't comment to much on the game however as I couldn't get the door open.  :'(
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline robingravel

Re:FormatPrint Kernel
« Reply #9 on: January 17, 2004, 09:11:13 AM »
Hi cloudee1

Quote
Why did you add new french verbs to the vocab list instead of just adding them to their english counterpart

This game is for French audience only because I got more e-mails rom them than from English people.

Don't worry for this detail. I shall translate Grostesteing: plus m
« Last Edit: January 17, 2004, 09:14:04 AM by Robin_Gravel »

Offline robingravel

Re:FormatPrint Kernel
« Reply #10 on: January 17, 2004, 12:02:41 PM »
I, Robin Gravel, close this thopic.

If you which to talk more about "Grostesteing: plus m


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

Page created in 0.035 seconds with 21 queries.