AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fatal Error 100 cannot read from file (https://forums.alliedmods.net/showthread.php?t=224286)

ShOgIBaRiBoA 08-22-2013 10:02

Fatal Error 100 cannot read from file
 
I have an error (Fatal Error 100 cannot read from file: "C:/users/******/desktop/.p)

and than it shows
(could not locate output file)

help please

YamiKaitou 08-22-2013 10:20

Re: Fatal Error 100 cannot read from file
 
Did you save your code as a SMA file?

ShOgIBaRiBoA 08-22-2013 15:16

Re: Fatal Error 100 cannot read from file
 
i Tried to compiler my SMA file to AMX and that's what it shows to me

Black Rose 08-22-2013 15:19

Re: Fatal Error 100 cannot read from file
 
Try compiling it in the Web Compiler.

YamiKaitou 08-22-2013 15:23

Re: Fatal Error 100 cannot read from file
 
Quote:

Originally Posted by ShOgIBaRiBoA (Post 2019590)
i Tried to compiler my SMA file to AMX and that's what it shows to me

Attach the code, because either you didn't save the file correctly or it is trying to include a file that is not found

ShOgIBaRiBoA 08-22-2013 16:22

Re: Fatal Error 100 cannot read from file
 
I deleted my code so i will try with someone code to show you the problem

Quote:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

(=V(0) : fatal error 100: cannot read from file: "D:\.p"

Compilation aborted.
1 Error.
Could not locate output file D:\Untitled.amx (compile failed).

YamiKaitou 08-22-2013 16:26

Re: Fatal Error 100 cannot read from file
 
Show us the code that generates that error

ShOgIBaRiBoA 08-22-2013 16:51

Re: Fatal Error 100 cannot read from file
 
Quote:

#include < amxmodx >
#include < amxmisc >

#pragma semicolon 1

new const PLUGIN[ ] = "AMXX-Cmd";
new const VERSION[ ] = "3.1" ;
new const AUTHOR[ ] = "CreePs" ;

new const URL[ ] = "www.game-serv.co.il" ;

new cmd_DATABASE[ 64 ][ 255 ];
new concmd_DATABASE[ 64 ][ 255 ];
new Total;
new filename[ 256 ];
new cvars[ 2 ];

public plugin_init( )
{
register_plugin( PLUGIN, VERSION, AUTHOR );

register_clcmd( "say", "cmdHandleSay" );
register_clcmd( "say_team", "cmdHandleSay" );

register_concmd( "amx_reloadcmds", "read_File" );

cvars[ 0 ] = register_cvar( "amxxcmd_mode", "1" );
cvars[ 1 ] = register_cvar( "amxxcmd_adminmsg", "1" );

set_task( 250.0, "Msg", _ , _ , _, "b" );

get_configsdir( filename, sizeof( filename ) - 1 );
format( filename, sizeof( filename ) - 1, "%s/AMXX-Cmd.ini", filename );

if( ! file_exists( filename ) )
{
make_File( );
}

read_File( );
}

public cmdHandleSay( client )
{
new message[ 128 ], cmd[ 33 ], arg1[ 65 ], arg2[ 64 ], arg3[ 64 ], arg4[ 64 ], edit[ 64 ], name[ 32 ];

read_argv( 1, message, sizeof( message ) - 1 );

parse( message, cmd, sizeof( cmd ) - 1, arg1, sizeof( arg1 ) - 1, arg2, sizeof( arg2 ) - 1, arg3, sizeof( arg3 ) - 1, arg4, sizeof( arg4 ) - 1 );

remove_quotes( message );

if( cmd[ 0 ] == '/' )
{
if( equali( cmd, "/link" ) || equali( cmd, "!link" ) )
{
ColorChat( client, "Download Link^x04 v%s^x01:^x04 %s", VERSION, URL );
}
else if( equali( cmd, "/credits" ) || equali( cmd, "!credits" ) )
{
ColorChat( client, "^4%s v%s^1 plugin has made by^3 %s^1.", PLUGIN, VERSION, AUTHOR );
}
}

if( get_pcvar_num( cvars[ 0 ] ) )
{
if( is_user_admin( client ) )
{
for( new i = 0; i < Total; i++ )
{
formatex( edit, sizeof( edit ) - 1, "!%s", cmd_DATABASE[ i ] );

if( containi( cmd, edit ) == 0 )
{
get_user_name( client, name, sizeof( name ) - 1 );

replace_all( concmd_DATABASE[ i ], 63, "#", " " );

if( ! arg1[ 0 ] && ! equali( cmd ,"!pass" )
|| arg1[ 0 ] == ' ' && ! equali( cmd ,"!pass" ) )
{
arg1 = "1";
}

client_cmd( client, "^"%s^" ^"%s^" ^"%s^" ^"%s^" ^"%s^"", concmd_DATABASE[ i ], arg1 , arg2, arg3, arg4 );

if( get_pcvar_num( cvars[ 1 ] ) )
{
ColorChat( 0, "Admin^x04 %s ^x01 has used ^x04''^x01 %s cmd^x04 ''", name, cmd_DATABASE[ i ] );
}

return PLUGIN_HANDLED;
}
}
}
}

return PLUGIN_CONTINUE;
}

public make_File( )
{
// file example
write_file( filename, "; Example how to add new cmds:^n^n" );
write_file( filename, "; CHAT_CMD_NAME=CONSOLE_CMD_NAME^n^n; Example how NOT to add new cmds:^n; CONSOLE_CMD_NAME=CHAT_CMD_NAME^n^n^n; All cmds below", 1 );

// original amxx cmds
write_file( filename, "ct=amx_transfer^nt=amx_transfer^nspec=amx_tr ansfer^nroundtime=amx_cvar#mp_roundtime^nft=a mx_cvar#mp_freezetime", 9 );
write_file( filename, "freezetime=amx_cvar#mp_freezetime^nrevive=am x_revive^nrestart=amx_cvar#sv_restart^nrr=amx _cvar#sv_restart", 14 );
write_file( filename, "gag=amx_gag^nungag=amx_ungag^nbury=amx_bury^ nunbury=amx_unbury^nrocket=amx_rocket^nkick=a mx_kick^nban=amx_ban", 18 );
write_file( filename, "slay=amx_slay^nslap=amx_slap^nmap=amx_map^ng low=amx_glow^nnoclip=amx_noclip^ngodmode=amx_ godmode^npause=amx_pause", 25 );
write_file( filename, "heal=amx_heal^nweapon=amx_weapon^nff=amx_cva r#mp_friendlyfire^npass=amx_cvar#sv_password^ ngravity=amx_cvar#sv_gravity", 32 );
write_file( filename, "aa=amx_cvar#sv_airaccelerate^nalltalk=amx_cv ar#sv_alltalk^nrs=amx_rcon#restart^namxx=amxm odmenu^nmmenu=amx_mapmenu", 37 );
write_file( filename, "kmenu=amx_kickmenu^nbmenu=amx_banmenu^nfire= amx_fire^nspeed=amx_speed^nuberslap=amx_ubers lap^nsuperslap=amx_slay2", 42 );
write_file( filename, "unammo=amx_unammo^ndrug=amx_drug^nportal=amx _teleport^nflash=amx_flash^nvotemap=amx_votem ap^nbuytime=amx_cvar#mp_buytime", 48 );
write_file( filename, "cvar=amx_cvar^nsetmoney=amx_cvar#mp_startmon ey^nsmenu=amx_slapmenu^npmenu=amx_teammenu", 54 );
}

public read_File( )
{
if( file_exists( filename ) )
{
new line[ 128 ], leftstr[ 32 ], rightstr[ 32 ];

new file;

file = fopen( filename, "rt" );

while( file && ! feof( file ) )
{
fgets( file, line, 127 ), trim( line );

if( ! line[ 0 ] || line[ 0 ] == ' ' || line[ 0 ] == ';' )
{
continue;
}

strtok( line, leftstr, sizeof( leftstr ) - 1, rightstr, sizeof( rightstr ) - 1, '=', 1);

formatex( cmd_DATABASE[ Total ], 63, leftstr );
formatex( concmd_DATABASE[ Total ], 63, rightstr );

Total++;
}
}
}

public Msg( )
{
if( get_pcvar_num( cvars[ 0 ] ) )
{
ColorChat( 0, "This server is running^4 %s^1 plugin, versoin^4 v%s^1 by^3 %s^1.", PLUGIN, VERSION, AUTHOR );
ColorChat( 0, "To download this %s versoin say^4 /link^1 in chat.", PLUGIN );
}
}

stock ColorChat(const id, const string[], {Float, Sql, Resul,_}:...)
{
new msg[191], players[32], count = 1;

static len;
len = formatex(msg, charsmax(msg), "^x04[^x01 AMXX-Cmd^x04 ]^x01 ");
vformat(msg[len], charsmax(msg) - len, string, 3);

if(id)
players[0] = id;
else
get_players(players,count,"ch");

for (new i = 0; i < count; i++)
{
if(is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"),_, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}

YamiKaitou 08-22-2013 16:53

Re: Fatal Error 100 cannot read from file
 
I get other errors related to the code, but not the error you are talking about. Are you sure you are saving the file as an SMA file?

ShOgIBaRiBoA 08-22-2013 18:45

Re: Fatal Error 100 cannot read from file
 
look i have the SMA file i want to compiler it to AMX i don't any of this S*** i just want to compiler this file can someone help me?????


All times are GMT -4. The time now is 18:49.

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