.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old October 28th, 2003, 07:28 AM
Rambie's Avatar

Rambie Rambie is offline
Sergeant
 
Join Date: Jul 2000
Location: Centerville, Utah, USA
Posts: 316
Thanks: 0
Thanked 0 Times in 0 Posts
Rambie is on a distinguished road
Default Re: PBW Emergency Site files v1.51 Finished and fixed.

Ruatha, you are doing a great job, keep it up! You're much appreciated by us addicted PBW players.

I don't know PHP, nor any programming language that well, so this may be a elementary question... but here goes anyway.

I was having a hard time getting the upload flag to work right. It looked like the IF test for the game name wasn't assigning a value to $testname if the $test1 and $test2 variables were equal. Thus throwing off the second IF statement. So I changed the code in Index.php

---From this---
$test1=strtolower(substr($file,0,-9));
$test2=strtolower("$gamename");
$ett=strlen($test1);
$tva=strlen($test2);
$tre=$tva-$ett;

if ($tre>0)
{
$testname=substr($gamename,0,-$tre);
}

if (strtolower(substr($file,0,-9)) == strtolower("$testname"))


---To this---
$test1=strtolower(substr($file,0,-9));
$test2=strtolower("$gamename");
$ett=strlen($test1);
$tva=strlen($test2);
$tre=$tva-$ett;

if ($tre>0)
{
$testname=substr($test2,0,-$tre);
}
else
{
$testname = $test2;
}

if ($test1 == $testname)


After making the changes the upload verification did seem to work OK. I changed the second IF statement so it wouldn't have to process the 'strtolower' (Convert string to lowercse I guess?) command again when the lowercase data was already in the $test1 and $test2 variables. I'm afraid to say this minor little change took me over 1-hour to figure out.

I don't know why the upload notification wasn't working for me, especially since I didn't see anyone else report any problems with it. But, I thought I would let you know incase anyone else was having this problem.

[ October 28, 2003, 05:32: Message edited by: Rambie ]
__________________
Rambie
www.xmission.com/~rstulce
Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.