30.12.2012, 19:49
Hey guys today I've a problem for the scripting compile errors.
Here they are..
And here is my script.
It's a offline ban command.
I'm not quite sure on how to fix it, it's supposed to be new INI:File = INI_Open(UserPath(playerid)); and then I replaced it to 'string', but it didn't work. I also used this code in a tutorial. I looked at the comments and they had no problem. Not quite sure.I also have tried to rename 'string' to params.It's also supposed to be name 'string' in the tutorial.
If you'd like the link, here.
Here they are..
Код:
C:\Users\default.Acer\Desktop\samp03e_svr_R2_win32\gamemodes\samp.pwn(8779) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
It's a offline ban command.
pawn Код:
CMD:offlineban(playerid,params[])
{
new string[124],string1[124],giveplayername[24];
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(sscanf(params, "s", giveplayername)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /offlineban [full name(case sensative)]"); return 1; }
format(string,sizeof(string),"/Users/%s.ini",params);
if(fexist(string))
{
// This is the line >>> new INI:File = INI_Open(UserPath(string));
INI_SetTag(File,"data");
INI_WriteInt(File,"Banned",1);
INI_Close(File);
format(string1, sizeof(string1), "* You have sucessfully offline-banned %s from the server.", giveplayername);
SendClientMessage(playerid,COLOR_YELLOW,string1);
}
else SendClientMessage(playerid, COLOR_GRAD2, "Invalid player name specified in the database !");
}
else SendClientMessage(playerid, COLOR_GRAD2, NOTADMIN);
return 1;
}
If you'd like the link, here.