Using BuildPath()
PHP Code:
|
Re: Using BuildPath()
It doesn't do what you think it does. Since SourcePawn exposes it's deep C roots, you need to use OpenFile which uses fopen under the hood. BuildPath is needed to correctly resolve paths relative to SM directory, so first you build path and then open file with, say, "w" mode to create one.
|
Re: Using BuildPath()
Thank FaTony, this gonna take log way. Is the file is automatically created or i need to manually create 1?
Yay.. she say undefined symbol path on the OpenFile things. PHP Code:
EDIT EDIT: okay 1st step done.. how can i write down player data in there? say i wan to save number or anyting and save it forever. I m looking at exvel save score plugin but i dont understand it. I don wan copy paste, i wan to understand and produce mine. |
Re: Using BuildPath()
Well... It's preferable to store player data in SQL rather than plain text. If it's something simple, you can use clientprefs.
|
Re: Using BuildPath()
Quote:
Hmm, I just noticed how terribad the wiki page is for ClientPrefs. Rewrite time for it, methinks! |
Re: Using BuildPath()
If you want to look at quality implementation using clientprefs, click on money system in my sig.
|
Re: Using BuildPath()
What i try to do is saving player point into file when they disconnected. Load the point again after the same id is rejoin. Its like rewrite the point for the same steamid or create new for new player join. I m not sure if cookie is the option.
And FaTonny.. this is my first time looking into your code. It very well writen |
Re: Using BuildPath()
I added a quick example to the Client Preferences API wiki page.
Anyway, so you want to do something like this? PHP Code:
|
Re: Using BuildPath()
Clientprefs desperately need Getter and Setter for int and float. I wanted to write a patch but never got to it.
|
Re: Using BuildPath()
Sorry i try my best to figure out what to do and where to begin but i pass out.. Here the part i dont undestand.
Quote:
And where is the data path saved? |
| All times are GMT -4. The time now is 11:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.