Raised This Month: $ Target: $400
 0% 

Error save system


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ah3llboy
New Member
Join Date: Jan 2014
Old 11-27-2014 , 02:52   Error save system
Reply With Quote #1

this is the rror
Quote:
L 11/26/2014 - 23:50:57: [AMXX] Run time error 10: native error (native "write_file")
L 11/26/2014 - 23:50:57: [AMXX] [0] hnsxp.sma::SavePoints (line 3592)
L 11/26/2014 - 23:50:57: [AMXX] [1] hnsxp.sma::ham_SpawnPlayerPost (line 3051)
L 11/26/2014 - 23:51:04: Couldn't write file "cstrike\"
L 11/26/2014 - 23:51:04: [AMXX] Displaying debug trace (plugin "hnsxp.amxx")
L 11/26/2014 - 23:51:04: [AMXX] Run time error 10: native error (native "write_file")
L 11/26/2014 - 23:51:04: [AMXX] [0] hnsxp.sma::SavePoints (line 3592)
L 11/26/2014 - 23:51:04: [AMXX] [1] hnsxp.sma::ev_DeathMsg (line 3694)
L 11/26/2014 - 23:51:04: Couldn't write file "cstrike\"
L 11/26/2014 - 23:51:04: [AMXX] Displaying debug trace (plugin "hnsxp.amxx")
L 11/26/2014 - 23:51:04: [AMXX] Run time error 10: native error (native "write_file")
L 11/26/2014 - 23:51:04: [AMXX] [0] hnsxp.sma::SavePoints (line 3592)
Line:
Quote:
public SavePoints( id ) {

new Name[ 32 ];
get_user_name( id, Name, 31 );

static Data[ 1024 ];
formatex( Data, sizeof( Data ) - 1, "^"%i^" ^"%i^" ^"%i^" ^"%i^" ^"%i^" ^"%i^" ^"%i^" ^"%i^"", User [ id ] [ Level ], User [ id ] [ Xp ], g_iUserPoints[id] , gDmgLevel[id], gHealthLevel[id], gSpeedLevel[id], gArmorLevel[id], gKnifeLevel[id] );

new Save[ 512 ];
format( Save, 511, "^"%s^" %s", Name, Data );

new Line[ 128 ], Linie, IsPlayer = false, Arg1[ 32 ];

new FileOpen = fopen( File, "rt" );

while( !feof( FileOpen ) ) {

fgets( FileOpen, Line, 127 );
trim( Line );

parse( Line, Arg1, 31 );

if( equali( Arg1, Name ) ) {

write_file( File, Save, Linie );
IsPlayer = true;
break;
}

Linie++;
}

fclose( FileOpen );

if( !IsPlayer ) {

write_file( File, Save, -1 );
}
}
ah3llboy is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 11-27-2014 , 04:27   Re: Error save system
Reply With Quote #2

Did you notice that the file had already closed when you execute write_file?
RateX is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-27-2014 , 06:39   Re: Error save system
Reply With Quote #3

Quote:
Originally Posted by RateX View Post
Did you notice that the file had already closed when you execute write_file?
That doesn't matter, write_file creates a separate handle for each call
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Decak
Senior Member
Join Date: Sep 2012
Old 11-27-2014 , 17:48   Re: Error save system
Reply With Quote #4

Write text of 'File'.
Decak is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode