Results 1 to 6 of 6

Thread: If not loggedin

  1. #1
    Join Date
    Apr 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default If not loggedin

    Hey guys, I am using kyle inkmans coal miner, but sometimes it logs off
    I am not sure why, it could be that it just doesnt mine for a while and goes to lobby, or my internet has stopped working again.

    I easily fixed this by copying the following from the beginning of the script:
    if(not(loggedin))then
    Loginplayer;
    WriteIn('internet was crappy again, logging in!'

    I placed it in the procedure of finding some coal, so that if it doesnt find coal it logs in again.
    However, it displays the message everytime it searches for coal! I am not sure whether continuous trying to log in increases ban chance, but I also just want it not to spam.

    So, have you any idea why it does not correctly recognize if the player is loggedin? I have no idea how to fix this myself..

  2. #2
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    then only affects the line under it

    something like this will work for you

    Simba Code:
    if (not loggedIn()) then
    begin  
      if loginPlayer() then
        writeln('internet was bad! logged back in')
    end;

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    before every procedure make it so that if it's not logged in then exit like

    Simba Code:
    if (not loggedin)then exit;

    then it the main loop do

    Simba Code:
    if (not loggedin) then loginplayer;

    That way it wont try to do anything if its not logged on (such as search for coal and be caught inside a infinate loop)

  4. #4
    Join Date
    Apr 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Thank you both, i was already thinking, 'no end needed in pascal?'

    Officer barbrady, I do not totally understand your code. Why would it exit if not loggedin? Could you explain it a bit more? ^^

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Skillery View Post
    Thank you both, i was already thinking, 'no end needed in pascal?'

    Officer barbrady, I do not totally understand your code. Why would it exit if not loggedin? Could you explain it a bit more? ^^
    Ok so let's say it's in the coal mining procedure, and the character logs out. The script is going to be looking for the coal but it's not logged in, so if you do that check, it will "exit" the procedure or function.

  6. #6
    Join Date
    Apr 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Ok so let's say it's in the coal mining procedure, and the character logs out. The script is going to be looking for the coal but it's not logged in, so if you do that check, it will "exit" the procedure or function.
    Aah okay, that is very clear
    Thanks for the help, i am not sure if i just gave the officer 2 rep or both one :/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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