Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: save script error

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    save script error

    hi , i test my mod on developer 1 and :

    Code:
    ******* script runtime error *******
    struct is not an entity: (file 'huntyaudobriy/save.gsc', line 3)
                            guid = self getGuid();
                                   *
    called from:
    (file 'huntyaudobriy/dmk.gsc', line 105)
            thread huntyaudobriy\save::save(level.wpfile);
                   *
    called from:
    (file 'maps/mp/gametypes/_callbacksetup.gsc', line 15)
      [[level.callbackStartGameType]]();
              *
    started from:
    (file 'maps/mp/gametypes/_callbacksetup.gsc', line 10)
    CodeCallback_StartGameType()
    *
    ************************************
    but if server on developer 0 mod work , whocan help me ?

    save script :

    PHP Code:
    save(file)
    {
                            
    guid self getGuid();
                
    f=openfile(guid+".txt""write");
                
    fprintln(fself.lol);
                
    fprintln(fself.rankc);
                
    closefile(f);


  2. #2
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    You need to call that function with "self", like this: self thread huntyaudobriy\save::save(level.wpfile);

  3. The Following User Says Thank You to EvoloZz For This Useful Post:

    kung foo man (7th April 2013)

  4. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    ok thanks i go test

  5. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Then youll still be trying to get the guid of the server, not of the client. Call it on a proper player instead of on level.

  6. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (7th April 2013)

  7. #5
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    ******* script runtime error *******
    pair 'undefined' and '.wp' has unmatching types 'undefined' and 'string': (file 'rankmod/dmk.gsc', line 1023)
    f=openfile(guid+".wp", "write");

    help plz

  8. #6
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    why not call it simply .txt ?

  9. The Following User Says Thank You to Jeplaa For This Useful Post:

    kung foo man (7th April 2013)

  10. #7
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    yes , why ?

  11. #8
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Why do you still assume that you are getting a correct guid if you are trying to getguid() the level?

  12. #9
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    IzNoGoD can you tell me what is to be an extension ?
    txt not work
    gsc not work
    wp not work
    can u help me ?

  13. #10
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    example:
    Redirect a player to save his stuff:
    PHP Code:
    self path\save::save(); 
    Save player stats:
    PHP Code:
    save()
    {
                
    guid self getGuid();

                
    openfile(guid ".txt""write");
                
    fprintln(fself.lol);
                
    fprintln(fself.rankc);
                
    closefile(f);

    No ... No ... this is not possible .......

  14. The Following 2 Users Say Thank You to Earliboy For This Useful Post:

    Invictus (9th June 2016),kung foo man (7th April 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
  •