Quote:
Originally Posted by Basicz
For you, it works 100%
In my logic, it works 0%
pawn Код:
undefined symbol "playerFile"
pawn Код:
#define playerFile "%s.ini" stock getini( playerid ) { new name[24]; GetPlayerName( playerid, name, 24 ); new file[ 64 ]; format( file, playerFile, name ); return file; }
You didn't even load it stats when a people connects.
pawn Код:
public OnPlayerConnect( playerid ) { if ( fexist( getini( playerid ) ) ) { INI_ParseFile( getini( playerid ), "position", .bExtra = true, .extra = playerid ); } return 1; }
forward position( playerid, name[], value[] ); public position( playerid, name[ ], value[ ] ) { INI_Float( "LastX", playerInfo[ playerid ][ posX ] ); // .......
return 1; }
// AND stock onPlayerLogout( playerid ) { new INI: pFile = INI_Open( getini( playerid ) ) ;
INI_WriteFloat(pFile, "LastX", PlayerInfo[playerid][pLastX]); INI_WriteFloat(pFile, "LastY", PlayerInfo[playerid][pLastY]); INI_WriteFloat(pFile, "LastZ", PlayerInfo[playerid][pLastZ]);
INI_Close(pFile);
return 1; }
public OnPlayerDisconnect( playerid ) return onPlayerLogout( playerid );
I guess, it worked in your server, but it didn't even compile ( the tutorial )
I guess, you didn't used Y_INI.
Not bad, you are good in explaining.
|
Код:
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(27) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
That is when I do
pawn Код:
#define playerFile "%s.ini"
stock getini( playerid ) {
new name[24]; GetPlayerName( playerid, name, 24 ); new file[ 64 ]; format( file, playerFile, name );
return file;
}