# Inform 7 - Number Restriction

Hi,

In my game I have a phone that people will at some point be able to dial numbers. Can anyone confirm if there is some kind of number restriction in the game on how many numbers can be used in a sentence. Here is the output to show the problem.

Game output:

[size=85]End of Corridor
You are at the end of an underground corridor that flows from the east. It is badly lit from steams of yellow light that pour through a grill on the southern door. To the north the passage opens up into a room while a closed door blocks passage southwards.

dial 999 on phone
The phone attempts to connect but fails and the line appears to be dead.

dial 1 on phone
The phone beeps and an automated messages says “The number you have dialed is incorrect. Please dial again and retry later”.

dial 11 on phone
The phone beeps and an automated messages says “The number you have dialed is incorrect. Please dial again and retry later”.

dial 111 on phone
The phone beeps and an automated messages says “The number you have dialed is incorrect. Please dial again and retry later”.

dial 1111 on phone
The phone beeps and an automated messages says “The number you have dialed is incorrect. Please dial again and retry later”.

dial 11111 on phone
The phone beeps and an automated messages says “The number you have dialed is incorrect. Please dial again and retry later”.

dial 111111 on phone
I didn’t understand that sentence.[/size]

My phone code is as follows:

```Understand "dial [a number] on [something]" as dialing it on. Understand "dial [a number] on [phone]" as dialing it on. Dialing it on is an action applying to one number and one thing. Check dialing: if the second noun is not the phone, say "You can't dial on [the second noun]." instead.```

```The phone is in the apartmentkitchen. "Your mobile phone lays discarded on the sofa.". The description of the phone is "The mobile phone is not unique.". the printed name of mobile phone is "mobile phone". Understand "mobile" or "phone" as phone. Instead of dialing 999 on the phone: if turn count < 11 begin; say "The phone rings out and you get connected. A friendly message says 'Thank you for your interest in the Emergency Services. I am afraid that all agents are busy and you will need to call again back later. Have a nice day'."; end if; if turn count > 10 and turn count < 16 begin; say "An automated message says 'I am afraid that this service is not available in this region'."; end if; if turn count > 15 begin; say "The phone attempts to connect but fails and the line appears to be dead."; end if; Instead of dialing when the second noun is the phone: say "The phone beeps and an automated messages says 'The number you have dialed is incorrect. Please dial again and retry later'.";```

It seems as soon as you hit six digits the command fails.

Thanks.

If you’re compiling to z-code, then seven-digit numbers will be above the maximum value that the z-machine can handle; I’m not positive that this is it, but it seems like the likely culprit.

You could try compiling to Glulx, which permits larger numbers. If your game isn’t going to need to compile to Glulx for some other reason, and you don’t want to compile to Glulx for this reason alone, you could try making the action apply to a text and then use a regular expression to make sure it’s all numbers. (This might also give you a little more flexibility with however phone numbers are formatted in the UK.)

Thank you Matt, Glulx fixed the problem.

Thanks for your help.