Raised This Month: $ Target: $400
 0% 

Help with file_write


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-26-2010 , 18:25   Re: Help with file_write
Reply With Quote #1

Quote:
Originally Posted by drekes View Post
I'm not sure if you can write to a .html file though
Sure you can, it's just plain text.

Quote:
Originally Posted by maakera View Post
PHP Code:
write_file("freeloto.html""<LI TYPE=square>" szName "</LI><br>", -1
You cannot concatenate like that in this language. It's not PHP.

Try this:

PHP Code:
    new szString[64]
    
formatex(szStringcharsmax(szString), "<LI TYPE=square>%s</LI><br>"szName)
    
write_file("freeloto.html"szString, -1
__________________
fysiks is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-26-2010 , 19:18   Re: Help with file_write
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
You cannot concatenate like that in this language. It's not PHP.
That looks like VB.Net syntax.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-26-2010 , 21:57   Re: Help with file_write
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
That looks like VB.Net syntax.
It's been too long since I took a VB.Net class. I thought it worked like that in PHP too.
__________________
fysiks is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-26-2010 , 22:22   Re: Help with file_write
Reply With Quote #4

AFAIK, PHP uses '.' to concatenate strings.
PHP Code:
$name "lol";
$message "Hello, $name!";
// or
$message "Hello, " $name "!"
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-26-2010 , 23:05   Re: Help with file_write
Reply With Quote #5

Oh yeah, that's right.
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-27-2010 , 07:10   Re: Help with file_write
Reply With Quote #6

Quote:
Originally Posted by Exolent[jNr] View Post
That looks like VB.Net syntax.
Even the legacy versions of VB allow you to concatenate like that.
__________________
Bugsy is offline
Reply



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 Off

Forum Jump


All times are GMT -4. The time now is 05:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode