Cant load script
#1

I have put my script into the filterscript folder. Then i opened sever.cfg. And type the name of my filterscript without typing .amx. But it is not loading because its file extension is not .amx it is .pwn so its not loading please help me.
Reply
#2

You need the .pwn and .amx in there and also a Gamemode will not run the Filterscript folder
Reply
#3

You don't need the pwn in there.

Open your .pwn file in the PAWN editor
Press F5 (compile)
Copy the resulting .amx file to server's gamemodes folder
Start server
Reply
#4

Following are the steps to run your server

1) Open your script , compile it (make sure you have all includes and all)
2)Copy The .amx and .pwn (optional) to your gamemodes folder
3)make sure in server.cfg the name of amx is out
4)Your Done Enjoy
Reply
#5

Iam having errors in the result produced after pressing F5

PAWN compiler output
C:\Documents and Settings\SBS\My Documents\Downloads\SA-MP Server Creator\SA-MP Server Creator\filterscripts\modernliferp.pwn(82) : fatal error 100: cannot read from file: "dini"

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


1 Error.



please help me
Reply
#6

download dini.inc and put in ur include folder then open pawno and press f5
Reply
#7

can you give the link to download it
Reply
#8

Ok i have downloaded dini.inc and i have put in the folder filterscripts. My pawn file is also inside that folder. i opned press F5 the same result again. So what i have to do ?

/*
* Dini 1.5.1
* © Copyright 2006 by DracoBlue
*
* @author : DracoBlue (http://dracoblue.com)
* @date : 13th May 2006
* @update : 3rd June 2007
* @require : DUtils 1.8
*
* This file is provided as is (no warranties).
*
* Feel free to use it, a little message in
* about box is honouring thing, isn't it?
*
*/

#if defined _dini_included
#endinput
#endif

#define _dini_included
#pragma library dutils

#include <dutils>

stock dini_Exists(filename[]) {
if (fexist(filename)) return true;
return false;
}

stock dini_Remove(filename[]) {
if (!fexist(filename)) return false;
fremove(filename);
return true;
}

stock dini_Create(filename[]) {
new File:fhnd;
if (fexist(filename)) return false;
fhnd=fopen(filename,io_write);
fclose(fhnd);
return true;
}

stock dini_PRIVATE_ExtractKey(line[]) {
new tmp[MAX_STRING];
tmp[0]=0;
if (strfind(line,"=",true)==-1) return tmp;
set(tmp,strlower(ret_memcpy(line,0,strfind(line,"= ",true))));
return tmp;
}

stock dini_PRIVATE_ExtractValue(line[]) {
new tmp[MAX_STRING];
tmp[0]=0;
if (strfind(line,"=",true)==-1) {
return tmp;
}
set(tmp,ret_memcpy(line,strfind(line,"=",true)+1,s trlen(line)));
return tmp;
}

stock dini_Set(filename[],key[],value[]) {
new File:fohnd, File:fwhnd;
new bool:wasset=false;
new tmpres[MAX_STRING];
if (key[0]==0) return false; /* If we have no sign in key, it can't be set*/
format(tmpres,sizeof(tmpres),"%s.part",filename);
fohnd=fopen(filename,io_read);
if (!fohnd) return false;
fremove(tmpres);
fwhnd=fopen(tmpres,io_write);
// if (!fwhnd) return false;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if ((!wasset)&&(equal(dini_PRIVATE_ExtractKey(tmpres) ,key,true))) {
/* We've got what needs to be replaced! */
format(tmpres,sizeof(tmpres),"%s=%s",key,value);
wasset=true;
}
fwrite(fwhnd,tmpres);
fwrite(fwhnd,"\r\n");
}

if (!wasset) {
format(tmpres,sizeof(tmpres),"%s=%s",key,value);
fwrite(fwhnd,tmpres);
fwrite(fwhnd,"\r\n");
}

fclose(fohnd);
fclose(fwhnd);

format(tmpres,sizeof(tmpres),"%s.part",filename);
if (fcopytextfile(tmpres,filename)) {
return fremove(tmpres);
}
return false;
}


stock dini_IntSet(filename[],key[],value) {
new valuestring[MAX_STRING];
format(valuestring,sizeof(valuestring),"%d",value) ;
return dini_Set(filename,key,valuestring);
}

stock dini_Int(filename[],key[]) {
return strval(dini_Get(filename,key));
}

stock dini_FloatSet(filename[],key[],Float:value) {
new valuestring[MAX_STRING];
format(valuestring,sizeof(valuestring),"%f",value) ;
return dini_Set(filename,key,valuestring);
}

stock Float:dini_Float(filename[],key[]) {
return floatstr(dini_Get(filename,key));
}

stock dini_Bool(filename[],key[]) {
return strval(dini_Get(filename,key));
}

stock dini_BoolSet(filename[],key[],value) {
new valuestring[MAX_STRING];
format(valuestring,sizeof(valuestring),"%d",value) ;
return dini_Set(filename,key,valuestring);
}

stock dini_Unset(filename[],key[]) {
new File:fohnd, File:fwhnd;
new tmpres[MAX_STRING];
format(tmpres,sizeof(tmpres),"%s.part",filename);
fohnd=fopen(filename,io_read);
if (!fohnd) return false;
fremove(tmpres);
fwhnd=fopen(tmpres,io_write);
// if (!fwhnd) return false;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if (equal(dini_PRIVATE_ExtractKey(tmpres),key,true)) {
/* We've got what needs to be removed! */
} else {
format(tmpres,sizeof(tmpres),"%s",tmpres);
fwrite(fwhnd,tmpres);
fwrite(fwhnd,"\r\n");
}
}

fclose(fohnd);
fclose(fwhnd);

format(tmpres,sizeof(tmpres),"%s.part",filename);
if (fcopytextfile(tmpres,filename)) {
return fremove(tmpres);
}
return false;
}

stock dini_Get(filename[],key[]) {
new File:fohnd;
new tmpres[MAX_STRING];
new tmpres2[MAX_STRING];
tmpres[0]=0;
fohnd=fopen(filename,io_read);
if (!fohnd) return tmpres;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if (equal(dini_PRIVATE_ExtractKey(tmpres),key,true)) {
/* We've got what we need */
tmpres2[0]=0;
strcat(tmpres2,dini_PRIVATE_ExtractValue(tmpres));
fclose(fohnd);
return tmpres2;
}
}
fclose(fohnd);
return tmpres;
}


stock dini_Isset(filename[],key[]) {
new File:fohnd;
new tmpres[MAX_STRING];
fohnd=fopen(filename,io_read);
if (!fohnd) return false;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if (equal(dini_PRIVATE_ExtractKey(tmpres),key,true)) {
/* We've got what we need */
fclose(fohnd);
return true;
}
}
fclose(fohnd);
return false;
}
Reply
#9

Iam creating a server for the first time so is there any one who can help me to create a server ?
Reply
#10

Just save the file as .inc and put in the right folder (include)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)