Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - A PHP script problem... | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Xkeeper The required libraries have not been defined. Level: NAN Posts: -4775/-863 EXP: NAN For next: 0 Since: 03-15-04 Since last post: 2 hours Last activity: -753366 sec. |
| ||
for($i=0;$i<$len;$i++){ // ASC "A" is 65 // "a" is 97 $d=$n[$i]; $z=$d; if (ord($d)>=97) $z=ord($d)-86; if (ord($d)>=65) $z=ord($d)-54; if($d=="/") $z=10; if($d=="%") $z=40; if($d==":") $z=41; if($d=="-") $z=42; if($d==" ") $z=43; if($d=="~") { $wtf=-1; $line=$line+1; $z=43; } ImageCopy($img,$gfx,($wtf+$ofs)*8,$line*9,$z*8,0,8,8); $wtf++; } I'm trying to get it to automatically make lowercase into CAPS and also CAPS subtract 54. However, this effectively makes everything after it stop working. Is there any way to make it work, posibly? [PS: http://sthick.cymoro.com/wtf/numgfxl.php?n=TESTHERE <--try putting ? ! - into it. It'll come up 0. ] |
|||
Acmlm Torosu heh Level: 51 Posts: 497/1173 EXP: 981994 For next: 31944 Since: 03-15-04 From: Somewhere that isn't outside of Sherbrooke, Québec, Canada Since last post: 39 days Last activity: 3 hours |
| ||
if (ord($d)>=97) $z=ord($d)-86;If x>97, then there's also x>65, so both lowercase and uppercase get substracted by 54 ... but a simple "else" or order change would fix it I'm not too sure about the other problem, but you didn't define numbers for ! and ? ... and for some reason, " gives !0 instead of just 0 |
|||
Tuvai Permanently banned for account hacking. Level: 24 Posts: 167/211 EXP: 74894 For next: 3231 Since: 03-15-04 Since last post: 566 days Last activity: 339 days |
| ||
You do know that there are functions to make characters uppercase and lowercase, right? I'm talking about strtolower() and strtolower(). | |||
ErkDog Fuzz Ball Level: 47 Posts: 183/982 EXP: 752190 For next: 14013 Since: 03-15-04 From: Richmond, VA Since last post: 40 days Last activity: 19 days |
| ||
I was about to say the same thing Tuvai you can use those functions and there is even a regex expression to do it.... |
|||
Xkeeper The required libraries have not been defined. Level: NAN Posts: -4769/-863 EXP: NAN For next: 0 Since: 03-15-04 Since last post: 2 hours Last activity: -753366 sec. |
| ||
Well I got that fixed, but now if you have a ? anywhere after a tilde (~, starts new line) it'll stop. |
|||
Acmlm Torosu heh Level: 51 Posts: 510/1173 EXP: 981994 For next: 31944 Since: 03-15-04 From: Somewhere that isn't outside of Sherbrooke, Québec, Canada Since last post: 39 days Last activity: 3 hours |
| ||
I don't know, seems fine to me |
|||
Xkeeper The required libraries have not been defined. Level: NAN Posts: -4768/-863 EXP: NAN For next: 0 Since: 03-15-04 Since last post: 2 hours Last activity: -753366 sec. |
| ||
It didn't do that last night. Woeh. XD I guess I screwed that up. Now I just have to add punctuation... possibly just make 256 characters and just use ORD() or something. But what about lowercase... EDIT: Look at this: I added the f= to make it easier to read but it still outputs the same. It ends after "TESTING!?". 1 line: 2 lines: 3 lines: Tetris: EDIT: WHY IS IT CHOKING ON PERIODS NOW?!?! And on a side note how it does that. It doesn't work on the top 2 liner but on the bottom one ti does. ... Does it require a space after the ? even if there's already been one? (edited by X on 04-07-04 12:38 PM) (edited by X on 04-07-04 01:19 PM) (edited by X on 04-07-04 01:21 PM) |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - A PHP script problem... | | | |