ID:139021
 
Code:
var/Changelog
var/Currenttime=time2text(world.realtime,"MM/DD/YYYY")
mob
verb
Set_Changelog()
set category = "Commands"
var/msg = input("Set changelog to?","Changelog") as text
if(!msg) return
Changelog+="<tr><td><font color=#D3D3D3><u><center>Author:</u><br>[src.name]</center></td><td><font color=#D3D3D3><u><center>Date:</u><br>[Currenttime]</center></td><td width=350><font color=#D3D3D3><center>[msg]</center></td></tr>"
Changelog()
set category = "Commands"
usr << browse("<html><body bgcolor=green><center><img src=http://www.byond.com/games/banners/91568.png></img><br><table border bordercolor=black><tr><th colspan=3><font color=#D3D3D3>Changelog</th></tr>[Changelog]</table></center></html>")


Problem description:
Well, every time I update the changelog, the new changelong comes under the previous one. I want it to come above it. How would I fix this?
changelog = new_changelog + changelog
In response to Emasym
Wouldn't that make a duplicate of every update?
In response to Raimo
Raimo wrote:
Wouldn't that make a duplicate of every update?

Nope.

//You are doing:

changelog += new_changelog

// which equals

changelog = changelog + new_changelog

// to get the new_changelog in front, you simply do just that

changelog = new_changelog + changelog

// notice I'm using '=' and not '+='


EDIT: new_changelog is of course the thing you just updated, and changelog being everything else (the version history, if you will)
In response to Emasym
Still duplicates:
Changelog
Author:
Shamo Date:
08/08/2011 1
Author:
Shamo Date:
08/08/2011 2
Author:
Shamo Date:
08/08/2011 1
This is what I got:
new_changelog="<tr><td><font color=#D3D3D3><u><center>Author:</u><br>[src.name]</center></td><td><font color=#D3D3D3><u><center>Date:</u><br>[Currenttime]</center></td><td width=350><font color=#D3D3D3><center>[msg]</center></td></tr>"
Changelog+=new_changelog+Changelog
In response to Raimo
Raimo wrote:
Still duplicates:
Changelog
Author:
Shamo Date:
08/08/2011 1
Author:
Shamo Date:
08/08/2011 2
Author:
Shamo Date:
08/08/2011 1
This is what I got:
> new_changelog="<tr><td><font color=#D3D3D3><u><center>Author:</u><br>[src.name]</center></td><td><font color=#D3D3D3><u><center>Date:</u><br>[Currenttime]</center></td><td width=350><font color=#D3D3D3><center>[msg]</center></td></tr>"
> Changelog+=new_changelog+Changelog
>


+=
=

Read my previous post carefully if you'd please.
In response to Emasym
Thanks, that did the job. Sorry but it's 3:33 AM, I'm a bit tired. =P