22.10.2014, 17:50
(
Последний раз редактировалось Jakwob; 22.10.2014 в 18:05.
Причина: Title chance, it sounded like i was banned
)
Hey guys i have a problem with a code,
The code is a simple unban. i thought it would be easy but im spending alot of time looking at the code, trying everything i know, checking i have not missed anything but i cant seem to find the problem.
all the ban code does is mark the players file as banned like you would with money ect here is tho code and here are the errors.
all suggestion are welcomed.
Thanks in advance for you help.
Problem Script
Related Script
The code is a simple unban. i thought it would be easy but im spending alot of time looking at the code, trying everything i know, checking i have not missed anything but i cant seem to find the problem.
all the ban code does is mark the players file as banned like you would with money ect here is tho code and here are the errors.
all suggestion are welcomed.
Thanks in advance for you help.
Problem Script
Код:
ACMD:unban(playerid, params[]) { new targetid[MAX_PLAYER_NAME], str[128]; if(sscanf(params,"u",targetid)) return SCM(playerid,-1, "--- /unban {33CCFF}<ID/Name>{FFFFFF}---"); new INI:file = INI_Open(Path(targetid)); //Line 711 INI_SetTag(file, "Player's Data"); INI_WriteInt(file, "Banned", 0); INI_Close(file); format(str, sizeof(str), "You have unbanned %s", GetName(targetid)); //Line 715 SCM(playerid, -1, str); return 1; }
Код:
C:\Documents and Settings\SAMP\Desktop\91.121.237.253_7847\filterscripts\Accounts.pwn(711) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\SAMP\Desktop\91.121.237.253_7847\filterscripts\Accounts.pwn(715) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Related Script
Код:
enum PlayerInfo { Pass[129], Adminlevel, Money, Scores, Kills, Deaths, Float: PosX, Float: PosY, Float: PosZ, Float: Angle, Interior, VirtualWorld, Sec, Min, Hour, Banned }
Код:
public loadaccount_user(playerid, name[], value[]) { INI_String("Password", pInfo[playerid][Pass], 129); INI_Int("AdminLevel", pInfo[playerid][Adminlevel]); INI_Int("Money", pInfo[playerid][Money]); INI_Int("Scores", pInfo[playerid][Scores]); INI_Int("Kills", pInfo[playerid][Kills]); INI_Int("Deaths", pInfo[playerid][Deaths]); INI_Int("Hour",pInfo[playerid][Hour]); INI_Int("Min",pInfo[playerid][Min]); INI_Int("Sec",pInfo[playerid][Sec]); INI_Int("Banned",pInfo[playerid][Banned]); return 1; }
Код:
public OnPlayerDisconnect(playerid, reason) { SetTimerEx("TOS", 1000, 1, "i", playerid); GetPlayerPos(playerid, pInfo[playerid][PosX], pInfo[playerid][PosY], pInfo[playerid][PosZ]); GetPlayerFacingAngle(playerid, pInfo[playerid][Angle]); new INI:file = INI_Open(Path(playerid)); INI_SetTag(file, "Player's Data"); INI_WriteInt(file, "AdminLevel", pInfo[playerid][Adminlevel]); INI_WriteInt(file, "Money", GetPlayerMoney(playerid)); INI_WriteInt(file, "Scores", GetPlayerScore(playerid)); INI_WriteInt(file, "Kills", pInfo[playerid][Kills]); INI_WriteInt(file, "Deaths", pInfo[playerid][Deaths]); INI_WriteFloat(file, "PosX",pInfo[playerid][PosX]); INI_WriteFloat(file, "PosY",pInfo[playerid][PosY]); INI_WriteFloat(file, "PosZ",pInfo[playerid][PosZ]); INI_WriteFloat(file, "Angle",pInfo[playerid][Angle]); INI_WriteInt(file, "Interior",pInfo[playerid][Interior]); INI_WriteInt(file, "VirtualWorld",pInfo[playerid][VirtualWorld]); INI_WriteInt(file,"Hour",pInfo[playerid][Hour]); INI_WriteInt(file,"Min",pInfo[playerid][Min]); INI_WriteInt(file,"Sec",pInfo[playerid][Sec]); INI_WriteInt(file,"Banned",pInfo[playerid][Banned]); INI_Close(file);