View Full Version : [COD4] Account system problem
hoek
3rd September 2015, 21:16
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
929
f=openfile(self.loginname+".cfg","write");
Tally
3rd September 2015, 21:24
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.
hoek
3rd September 2015, 22:26
But when i use developer and developer_script with dedicated 0 i get as same as error
IzNoGoD
3rd September 2015, 22:31
so put the specific code inside /# CODE GOES HERE #/ tags as per the error you're getting...
Tally
4th September 2015, 06:36
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?
hoek
4th September 2015, 09:38
IzNoGoD
When i use the /# #/ how to endable it in server ?
Tally
We want to create VIP functions and stats online and more
IzNoGoD
4th September 2015, 13:47
IzNoGoD
When i use the /# #/ how to endable it in server ?
Tally
We want to create VIP functions and stats online and more
use:
/#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: ??
hoek
4th September 2015, 14:49
Okey thank you tomorrow i add you
hoek
5th September 2015, 18:07
I can't add you becouse i can't buy game in steam ( my steam hoek18)
IzNoGoD
5th September 2015, 19:29
"There are no users that match your search"
gimme a link to your profile
hoek
6th September 2015, 09:09
http://steamcommunity.com/profiles/76561198086605161/
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.