Comments on: Design by Contract in PHP with Assertions http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9355 Sat, 14 Jun 2008 22:11:30 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9355

I think you may have a typo in your user agent string, and the script just falls back on the default (un-changable) one which I guess is Mozilla.

Reply  |  Quote
]]>
By: Travis McCrea http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9354 Sat, 14 Jun 2008 19:32:26 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9354

… Thats crazy… i was setting up my useragent again… and somehow i double posted and it changed my version to “mozilla 1.8.1.14” crazy

Reply  |  Quote
]]>
By: Travis McCrea http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9353 Sat, 14 Jun 2008 19:30:53 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9353

Thats true… I should really set that up.. I just am always lazy.. uploading it just seems easier. :D its that habit thing we were talking about.

Reply  |  Quote
]]>
By: Travis McCrea http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9352 Sat, 14 Jun 2008 19:28:53 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9352

Thats true… I should really set that up.. I just am always lazy.. uploading it just seems easier. :D its that habit thing we were talking about.

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9294 Sun, 08 Jun 2008 23:27:51 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9294

[quote comment=”9287″]do i have to call the database information inside the function or will it work just inside the file?[/quote]

No, not necessarily. If you do it outside of the function it should be fine.

[quote comment=”9288″]I don’t have access to the ftp tonight but I will try later.. .Thanks man[/quote]

Btw, why don’t you just set up a dev environment on your local machine. Check out XAAMP for example for a quick and painless setup for WAMP envirionment. It’s probably quicker way to code than the upload/test/change/upload routine.

Reply  |  Quote
]]>
By: Travis McCrea http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9288 Sun, 08 Jun 2008 22:22:42 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9288

:P and i sure hope that its not that damn i (well i kinda do, makes it a simple fix… and easly over looked.. .thats why i hate code, i wish it would read our minds)

I don’t have access to the ftp tonight but I will try later.. .Thanks man

Reply  |  Quote
]]>
By: Travis McCrea http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9287 Sun, 08 Jun 2008 22:20:17 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9287

do i have to call the database information inside the function or will it work just inside the file?

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9286 Sun, 08 Jun 2008 21:52:18 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9286

I don’t know whether or not this is a typo, but check line 51:

$infa = inumber_format($data['infantry']);

I think it should be number_format rather than inumber_format:

$infa = number_format($data['infantry']);

Also see if you can print out the results as they come out of the database:

print_r($data);

This may help you debug this issue.

Reply  |  Quote
]]>
By: Travis McCrea http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9284 Sun, 08 Jun 2008 18:45:58 +0000 http://www.terminally-incoherent.com/blog/2008/06/05/design-by-contract-in-php-with-assertions/#comment-9284

http://paste2.org/p/37171

I was wondering if you could take a look at that for me? For some reason, it doesn’t display, it doesn’t give me an error… it just doesn’t display.

In my game I am developing, we are having an issue with sometimes when someone attacks someone else… that (since its all based on classes) between lag and something else… sometimes there are weird times when nothing shows up.

so i want to put this in the “view territory page” so when someone accesses their profile page, it will make sure that it displays the correct information, AND update it in the database. (the update part has been removed for security reasons, but it should still work even without that)

Reply  |  Quote
]]>