Results 1 to 7 of 7

Thread: script error :(

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    Quote Originally Posted by malyczolg View Post
    Still wrong,
    i said: "you donīt need" but i dindīt said u MUST remove them.
    Its just to make your script shorter and easier to read.
    I personally donīt like the {} if u only use 1 statement in a if/else

    @loveboy
    remove the "if getGuid()" stuff.
    Just do that stuff at connecting like "self getRank();"

    PHP Code:
    getRank()
    {
             if(!
    thread guidCheck(self getGuid()))
                   return;

    self.rank["vip"] = true;
    self.rank["god"] = true;
    //also you need to move this stuff to an switch
    }

    guidCheck(guid)
    {
            switch(
    guid)
            {
                    case 
    1234567:
                           return 
    true;
                    default:
                           return 
    false;
             }
    //Since we are still here ... (blabla)
    return false;

    You can easy write a system to give ppl access to menus/vip stuff.
    You donīt need to use at every line if(self getGuid == 1234 || self getGuid == 213424353) etc.
    You just need then: if(self.rank["vip"]) dostuff();
    No ... No ... this is not possible .......

  2. The Following User Says Thank You to Earliboy For This Useful Post:

    kung foo man (1st May 2013)

Posting Permissions

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