Previous Thread
Next Thread
Print Thread
Rate Thread
);
print qq( );
print qq( );
}
---------------------/code-----------------------------
(as you may have noticed the name of the field IS changed by 1)
now, after that, i want to create a file with the gamename, and putting ALL the codes/codenames into the folder.
i am using the following code
--------------------------------------code-----------------------------------
open (FILE, ">$gameName.txt");
print FILE $description[$count];
print FIKE $code[$count];
close FILE
}
----------------------------/code-----------------------------------

now my problem is that its NOT printing the codes, nor the code names in the txt field, and it IS printing $gamename.txt

can someone please help me?

---------------------------all code-----------------------------------
#!C:Perlbinperl.exe

print "Content-type: text/htmlnn";

use CGI qw(:standard);

for ($count = 1; $count <= $number; $count++){
@description[$count] = param("description$count");
@codes[$count] = param ("code$count");
}

$number= param('NumberOfCodes') || 10;
$user = param('user');
$pass = param('pass');
$gameName = param ('name');
$code = param ('codes$count');


print qq( );

print <



Joined: Aug 2000
Posts: 37
Member
Member
Offline
Joined: Aug 2000
Posts: 37
okay, i am writing a script that will update my gameshark codes, and what you do is login (specify the game name, number of codes, username, password) and depending on how many codes you specify, it will loop certain html code that many times
------------------code------------------------
for ($count = 1; $count <= $number; $count++){
print qq(
$count





..::GameShark Codes::..






















Number Of Codes:
Game Name:
UserName:
Pass:







InitialHTML
;

if (($user eq "whatever") && ($pass eq "whatever")){
&works; }
else {
$wrong; }
sub wrong{
print "Wrong stupid! Get out!";
}

sub works{
print <






..::Adding Codes::..










beginningHTML
;

for ($count = 1; $count <= $number; $count++){
print qq( );
print qq( );
print qq( );
}

print <

NumberCode DescriptionCode
$count

endHTML
open (FILE, ">$gameName.txt");
print FILE $description[$count];
print FIKE $code[$count];
close FILE
}


------------------
check out my site at http://www.ultimategamers2000.com
Sponsored Links
Joined: Sep 2000
Posts: 138
Em8 Offline
Member
Member
Offline
Joined: Sep 2000
Posts: 138
open (FILE, ">$gameName.txt") or die $!;
print FILE $description[$count];
print FIKE $code[$count];
close FILE or die $!;

And see whats bold?

Oh and if you like:
print qq( Hi #27 );

you have to:
print qq( Hi #27 );

------------------


This message has been edited by Em8 on January 11, 2001 at 07:00 PM

);
with
print qq( );
?
o, and that FIKE thing didnt work, try it on your own machine... it wont work! and i have NOidea why!
------------------
check out my site at http://www.ultimategamers2000.com

This message has been edited by ultimategamer2k on January 11, 2001 at 07:48 PM
Joined: Aug 2000
Posts: 37
Member
Member
Offline
Joined: Aug 2000
Posts: 37
does that mean that i have to change
print qq(
$count$count
);

Nope, qq means Double Quote, it's the same as using standard speech marks - with the added bonus of not having to escape anyother character other than the one you use as a limiter/delimeter.

I recommend you use something other than a bracket in a qq statement, pick something odd, like the tidle.

print "";

is the same as

print qq!
!;
and
print qq~
~;

...etc.
Joined: Oct 2000
Posts: 24
Member
Member
Offline
Joined: Oct 2000
Posts: 24
print qq(
$count
Joined: Oct 2000
Posts: 24
Member
Member
Offline
Joined: Oct 2000
Posts: 24
Interesting, I'm not sure if you can parse a dynamic parameter like this:

Code
code:

If you can, you need to get the scripts to interpolate it like so (add speechmarks)

Code
code:

If all else fails, try this:

Code
code:

This message has been edited by Matt@ikonboard on January 11, 2001 at 07:59 PM

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)