• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

PHP error

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
what is wrong with it?

Parse error: syntax error, unexpected '?'
PHP:
echo $account->getPlayervip_time(); ? "</br ><center><b>You have '.$account->getPlayervip_time().' VIP days.";
 
Last edited:
What is an UNIX timestamp? you haven't even looked it up, google it -.-

I was wondring the same... Do some research and if you really can't find any solution which i doubt then i think Zisly will help you, otherwise i will try even though i'm not so good with Modern AAC...
 
Wooow, thank you rep!

- - - Updated - - -

Can you help with it?
PHP:
		function AddPremium($name,$days) {
			$SQL = $this->connect();
			$account = $this->getPlayerAccount($name)->fetch();
			return $SQL->query('UPDATE accounts SET vip_time = (vip_time + '.$days.') WHERE name = "'.$account['name'].'"');
		}
How To Ask Questions The Smart Way
 
Yes

- - - Updated - - -

You made it:
PHP:
echo "<center><b>You have ".intval(($account->getPlayervip_time() -  time())/86400)." VIP days.";
Can you teach me how to use IF?
if getPlayervip_time() <=0 then show 0
else use script above
 
Oh, sure
PHP:
		function AddPremium($name,$days) {
			$SQL = $this->connect();
			$account = $this->getPlayerAccount($name)->fetch();
			return $SQL->query('UPDATE accounts SET vip_time = (vip_time + (unix_timestamp(now()) + '.$days.' * 86400)) WHERE name = "'.$account['name'].'"');
		}
 
Oh, sure
PHP:
		function AddPremium($name,$days) {
			$SQL = $this->connect();
			$account = $this->getPlayerAccount($name)->fetch();
			return $SQL->query('UPDATE accounts SET vip_time = (vip_time + (unix_timestamp(now()) + '.$days.' * 86400)) WHERE name = "'.$account['name'].'"');
		}
Untested
PHP:
echo "<center><b>You have ".(($days = intval(($account->getPlayervip_time()  -  time())/86400)) <= 0 ? 0 : $days)." VIP days.";
 
Work but look
PHP:
echo "<center><b>You have ".(($days = intval(($account->getPlayervip_time()  -  time())/86400)) <= 0 ? 0 : $days)." VIP days remaining.";
If is 0 it should show You haven't Vip days.
 
Thank you -.-
Christ, I help you and you're acting like an ungrateful little child. I really hope the website of your server gets penetrated mercilessly. Here I was getting some faith back but yet again I was being naive, this community is a complete lost cause, filled with a bunch of lazy kids unwilling to try anything themselves. My wish is kinda sad but I'd like the official developers who pour time in sustaining this community to quit or create a private group for them to pass on the legacy, not let any of you guys get any piece of the cake, that scenario would be fun as hell; seeing you desperate kids on your own.
 
Last edited:
Christ, I help you and you're acting like an ungrateful little child. I really hope you the website of your server penetrated hard. Here I was getting some faith back but yet again I was being naive, this community is a complete lost cause, filled with a bunch of lazy kids unwilling to try anything themselves. My wish is kinda sad but I'd like the official developers who pour time in sustaining this community to quit or create a private group for them to pass on the legacy, not let any of you guys get any piece of the cake, that scenario would be fun as hell; seeing you desperate kids on your own.

enjoy brs
 
Back
Top