Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An error on my script... :( 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I hav noticed an error on my script. It's not printing correctly.

For the form part I have this:

Field #1 Size: <INPUT TYPE=&quot;TEXT&quot; NAME=&quot;Field1Size&quot; VALUE=&quot;$vars_gen{'Field1Size'}&quot; SIZE=3 MAXLENGTH=3><BR>
Field #1 Maximum Size: <INPUT TYPE=&quot;TEXT&quot; NAME=&quot;Field1MaxSize&quot; VALUE=&quot;$vars_gen{'Field1MaxSize'}&quot; SIZE=3 MAXLENGTH=3></B></FONT>
</td>


...and for the printing part it looks like this:

print FILE qq!Field1Size => q~$vars_gen{'Field1Size'}~,\n!;
print FILE qq!Field1MaxSize => q~$vars_gen{'Field1MaxSize'}~,\n!;


Everything I have done above and below that works perfectly.

On my default variable file it's set to 20 for Size and 50 for max size. After I submit the form and go back it looks somthing like 20202020202020202020 and 505050505050505050.

What am I doing wrong and how can I fix this...?

Thank you!! ;-)
 
i can't tell from the code you posted what's going on. if you could post some more of the surrounding structures, it might be easier to interpret. maybe even posting (or at least looking carefully yourself) every instance where those variables are accessed or moved or anything. &quot;If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito.&quot;
 
Sounds like a for or while loop going haywire :p
been there and played this game before.
Make sure if you have a loop that waits until a certern limit is reached, you have a last; in there too to kill it off.
This happens a lot when using multiple jumps with for loops, and with whiles. Major pain in the but

HTH
Sib
Siberdude
siberdude@settlers.co.uk
 
I figured out the problem. Below:

Field #1 Size: <INPUT TYPE=&quot;TEXT&quot; NAME=&quot;Field1Size&quot; VALUE=&quot;$vars_gen{'Field1Size'}&quot; SIZE=3 MAXLENGTH=3><BR>

was not finished and I had other Field1Size's and that's why it wasn't printing correctly.

Thank you for replying. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top