[unsolved] Help with Towing Company Filtherscript
#1

Im trying to make a filtherscript, and my main problem is the save file. I want it where this can be just put on any server and work. Ive tried taking the same principals of the save file from my gamemode, but i keep getting errors.

This is my code
Код:
//==============================================================================

#include <a_samp>

//==============================================================================

//define

//new
new S25Rank;
new s25codePlayerName;


//fwd
forward ini_GetValue( line[] );



public OnFilterScriptInit ( )
{
    print ( "||======================||" );
	print ( "||Stage 25 Towing Script||" );
	print ( "||Made by: Dylan_Madigan||" );
	print ( "||======================||" );
	
	return 1;
}

//==============================================================================

public OnFilterScriptExit ( )
{
	print ( "||======================||" );
	print ( "||Stage 25 Towing Script||" );
	print ( "||       UNLOADED       ||" );
	print ( "||======================||" );
	
	return 1;
}

//==============================================================================

public OnPlayerConnect ( playerid )
{
    new string2[64];
	GetPlayerName(playerid, s25codePlayerName, sizeof(s25codePlayerName));
	format(string2, sizeof(string2), "S25///%s.ini", s25codePlayerName);
	new File: UserFile = fopen(string2, io_read);

		if(IsPlayerConnected(playerid))
			{
				new key[ 256 ] , val[ 256 ];
			    if( strcmp( key , "S25Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][S25Rank] = strval( val ); }
       		}//end while
         	fclose(UserFile);//close the file after everything has been read in the while
		}
		else
		{
			
	        return 1;
		}
		
	return 1;
}


//==============================================================================

public OnPlayerDisconnect ( playerid )
{

			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, s25codePlayerName, sizeof(s25codePlayerName));
			format(string3, sizeof(string3), "S25///%s.ini", s25codePlayerName);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{
				format(var, 32, "S25Rank=%d\n",PlayerInfo[playerid][S25Rank]);fwrite(hFile, var);
			}
	return 1;
}

//==============================================================================

public OnPlayerCommandText ( playerid , cmdtext [ ] )
{

		if(strcmp(cmdtext, "/S25Help", true) == 0)
		{

			SendClientMessage(playerid, COLOR_GREY, "Commands Under Construction");
		return 1;
		}


	return 0;
}
and this is the errors
Код:
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\Stage_25_Towing.pwn(46) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\Stage_25_Towing.pwn(46) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\Stage_25_Towing.pwn(50) : warning 217: loose indentation
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\Stage_25_Towing.pwn(53) : error 004: function "ini_GetValue" is not implemented
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\Stage_25_Towing.pwn(53) : error 033: array must be indexed (variable "val")
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\Stage_25_Towing.pwn(53) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Compaq_Owner.150_SERVER\Desktop\1000 SAW MP\filterscripts\Stage_25_Towing.pwn(53) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
How do i fix this?

EDIT***

I fixed it, just redid many things.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)