ID:139535
 
Code:
mob
proc
SUBS()
set category="Debug"

var/http[]=world.Export("http://paygamez.angelfire.com/Subscribers.txt")
var/F=http["CONTENT"]
if(F)
var/FX=html_encode(file2text(F))
var/key=copytext(FX,1,findtext(FX,"/"))
var/date=copytext(FX,findtext(FX,"/")+1)
var/expdate=date
Keys+=key


var/time = time2text(world.realtime, "DD-MM-YY")

if(time <= date&&usr.key==key)
src<<time2text(world.realtime,"DD-MM-YY")
usr<<"You are Subscribed"
else
usr<<"You are not Subscribed to Pay Gamez"


Problem description:I cant make it work it was suppose to output wherever if the player is subscribed or not but it always output "you are not subscribed" plz help

You can't compare 2 text strings to see if they are mathematically equal, less, or greater. Convert the Month, Day, and Year to numbers, then compare.
In response to Maximus_Alex2003
So you mean i should use text2num proc
In response to Maximus_Alex2003
Yes, you can compare text strings. The issue is that the order of the date strings is backwards, here. They need to be in YYYY-MM-DD format, otherwise it just says, "Oh, today is the fourth which is later than the first, so clearly the subscription has expired".
In response to Garthor
Yeah, that's why I have my Lite Sub check each, although I should make year first, although it wouldn't make any difference to my Lite Sub. Was that reply for me or OP?
I would convert the number to days, and compare.

Example:
proc/text2time(time) //mm-dd-yy for format
var/month = text2num(copytext(time,1,3))
var/day = text2num(copytext(time,4,6))
var/year = text2num(copytext(time,7,0))
var/days = 0
days+= 1 + day + (year*365) + round(year/4) // the extra 1 is for leep year in 2000
if(year/4 == round(year/4) && month < 3)
days -= 1
if(month > 1)
days+=31
if(month > 2)
days+=28
if(month > 3)
days+=31
if(month > 4)
days+=30
if(month > 5)
days+=31
if(month > 6)
days+=30
if(month > 7)
days+=31
if(month > 8)
days+=31
if(month > 9)
days+=30
if(month > 10)
days+=31
if(month > 11)
days+=30
if(days>=round(world.realtime/864000))
world << "User is a subscriber [days] vs [round(world.realtime/864000)]"


In response to Maximus_Alex2003
That reply was to you claiming that you cannot compare text strings using < and >, which is categorically false.