Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Delphi skipping lines during run..

  1. #11

    Delphi skipping lines during run..

    I think it's the read/write string part. Would you try this code instead? I know it works, and it'll narrow down your problem possibilities:

    [pascal]procedure TxnStream.WriteString(const Value: String);
    var
    l: integer;
    begin
    l := length(Value);
    write(l,sizeof(l));
    write(pchar(Value)^,l);
    end;

    procedure TxnStream.ReadString(var Value: String);
    var
    l: integer;
    begin
    read(l,sizeof(l));
    setlength(Value,l);
    read(pchar(Value)^,l);
    end; [/pascal]

    I think that the loop that looks for the #0 character is what's killing your code. On top of that, it could be error prone due to the char by char read/write... I'm no pro though.

  2. #12

    Delphi skipping lines during run..

    Hi Robert,

    I will give your code a try, it may solve a minor problem im having with stringlists,

    I have finally discovered what was causing my problem,
    simply because i was stupid and forgot to register a classtype that my world structure uses :s

    My world structure contains several classes depending on each object (for example a face would be TxseFace, a lightsource would be TxseLightsource, etc) but all these are stored in a global register and every time i add or load an object in to the world structure it checks to see if it is valid in the register and can then register it.

    But for this to work at the moment i have to have each classes unit in the uses clause of the applications project file or main unit so because i have in the classes unit at the initialization section i register the class, this is probably really dump, and i will have to change this at some time :s
    M109uk
    <br />--------------------------------------------------------
    <br />www.pulse-soft.oneuk.com

  3. #13

    Delphi skipping lines during run..

    That'll kill you every time... :roll: Been there, done that...

    My code is really what I learned elsewhere, and I found it to not only be fast but error free. Since your strings won't likely be 2,147,483,647 characters long I would reccommend using a "word" variable, and it'll be smaller as well.


    I've checked out your site m109uk, and seeing your kind of issues with flat files why don't you check this site out: FreePgs

    A one time fee of $16 will get you 350mb of space and unmetered bandwidth (50gb a month or so) + Perl/PHP/MySQL and more + an annual $10 for a domain (optional). If you already have a domain, you could talk to the admin and get it to manage that domain. I've found it to be a very nice hosting plan, it's a subsidiary of LCVS.net.

  4. #14

    Delphi skipping lines during run..

    lol yeah tell me about it, its always something :s
    Most of my code goes on the principle of future core updates, and on configuration which isnt always the best mix :d

    one of these days i will learn haha


    Cool thanx i will have a look,
    the bigger problem with my current server is although i have so called "unlimited" space i have to connect to the webspace and email clients through there 32bps connection (gets very annoying quickly)
    M109uk
    <br />--------------------------------------------------------
    <br />www.pulse-soft.oneuk.com

  5. #15

    Delphi skipping lines during run..

    Quick note on the hosting I reccommended, but it's $10 for the backend for the domain .... and it must be registered seperately, so it end's up at about $18.95 a year for a site. But that's not bad. Sorry it's in dollars, I'm not that familiar with Pounds and the UK monitary system.

  6. #16

    Delphi skipping lines during run..

    lol thanks Robert,
    yeah i have registered an account and the domain name, a grand total of around 30$ which is probably around 18AĴ£ which is great
    and didnt take very long to upload everything

    just waiting for the domain name to be transfered (48hrs i think), got some more updates to do on my website now (again) lol from files to dbs...

    thanx again Robert..
    M109uk
    <br />--------------------------------------------------------
    <br />www.pulse-soft.oneuk.com

  7. #17

    Delphi skipping lines during run..

    No problem, glad to help! My site's under construction as I just got my domain and have to upload/configure everything. I'll pm you a link once it's operational.

  8. #18

    Delphi skipping lines during run..

    Cool, i look forward to seeing it



    Iv been bored for the last few hours, and decided to go from BioCoders to BioSphere :s
    and even designed a logo kinda thingy:


    and its animated [avi]

    ps.
    I have no artistic talent what so ever lol am still messing about so dont expect too much lol
    M109uk
    <br />--------------------------------------------------------
    <br />www.pulse-soft.oneuk.com

  9. #19

    Delphi skipping lines during run..

    I like it. The "software" part is a little difficult to read, mainly the "w", due to it's size.


    My site is: http://www.thewickedflea.com/ - Your source for everything Flea bitten. (every one's welcome, I am The Wicked Flea there )

    The front page is just a placeholder at the moment, as I spent the greater half of my free time setting up the forum. The forum is anything but inactive right now... more people will sign up tomorrow, as half the previous members aren't in yet. From programming to tools and games, it's all there.

    I'll be working on the front page tomorrow...

  10. #20

    Delphi skipping lines during run..

    Quote Originally Posted by Robert Kosek
    I like it. The "software" part is a little difficult to read, mainly the "w", due to it's size.
    Cool, thanx..
    Yeah its not so bad with the full sized image, but i was thinking about either using a different font or maybe rotating the viewport a bit more..

    I want add more effects to it, see what happens lol


    Your site looks great, look forward to seeing your finished frontpage
    I'l be signing up soon
    M109uk
    <br />--------------------------------------------------------
    <br />www.pulse-soft.oneuk.com

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •