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

Thread: [COD4] Account system problem

  1. #1
    Private
    Join Date
    May 2014
    Posts
    20
    Thanks
    5
    Thanked 13 Times in 5 Posts

    Unhappy [COD4] Account system problem

    Hello
    Me and my friend started cod4 modding and we want to create an account system first.
    (We have got our cod2 mod what have got account system , and we try to use that)
    But we have got a problem and we cant solve that
    We use openfile for the account creating and load but always get this error for the openfile

    Click image for larger version. 

Name:	shot0000.jpg 
Views:	61 
Size:	169.4 KB 
ID:	929

    Code:
    f=openfile(self.loginname+".cfg","write");

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    You can't use any of the file functions in COD4 unless you are in developer mode. That's what the error is telling you - the /# #/ braces are developer braces.

    This makes the file functions basically useless for servers purposes because, of course, you can't run a dedicated server in developer mode.
    Last edited by Tally; 3rd September 2015 at 21:26.

  3. #3
    Private
    Join Date
    May 2014
    Posts
    20
    Thanks
    5
    Thanked 13 Times in 5 Posts
    But when i use developer and developer_script with dedicated 0 i get as same as error

  4. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    so put the specific code inside /# CODE GOES HERE #/ tags as per the error you're getting...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  5. #5
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by hoek View Post
    But when i use developer and developer_script with dedicated 0 i get as same as error
    But the thing is, COD4 has its own method of writing and reading to files: setStat() and getStat(). There isn't much that you can't do with these functions when it comes to account systems. So, why bother with the developer's file functions when you have such a better system?

  6. #6
    Private
    Join Date
    May 2014
    Posts
    20
    Thanks
    5
    Thanked 13 Times in 5 Posts
    IzNoGoD
    When i use the /# #/ how to endable it in server ?

    Tally
    We want to create VIP functions and stats online and more

  7. #7
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by hoek View Post
    IzNoGoD
    When i use the /# #/ how to endable it in server ?

    Tally
    We want to create VIP functions and stats online and more
    use:
    Code:
    /#f=openfile(self.loginname+".cfg","write");#/
    i think... never used this...

    You cannot and should not use this in a production server. If this is to create waypoints then its fine, but for any other purpose (statistics storage) it should NOT be used.

    I got a pretty neat mysql setup for cod4, add me on steam. Search for IzNoGoD, my avatar looks like: ??
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  8. #8
    Private
    Join Date
    May 2014
    Posts
    20
    Thanks
    5
    Thanked 13 Times in 5 Posts
    Okey thank you tomorrow i add you

  9. #9
    Private
    Join Date
    May 2014
    Posts
    20
    Thanks
    5
    Thanked 13 Times in 5 Posts
    I can't add you becouse i can't buy game in steam ( my steam hoek18)

  10. #10
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    "There are no users that match your search"

    gimme a link to your profile
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

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