10.08.2015, 17:36
hey i got this error
on this code
this is the line
and can someone explain how to use this parsefile tq
Код:
C:\Users\xXXXX\Desktop\settime.pwn(70) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #include <zcmd> #include <sscanf2> #include <YSI\y_ini> #define PATH "/Users/%s.ini" //Users Path #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" SetWeather & Time V1 Loaded"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else enum pInfo { pPass, pCash, pAdmin, pKills, pDeaths, pVip, pDJ, pBanned } new PlayerInfo[MAX_PLAYERS][pInfo]; stock UserPath(playerid) { new string[128],playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),PATH,playername); return string; } forward LoadUser_data(playerid,name[],value[]); public LoadUser_data(playerid,name[],value[]) { INI_Int("Password",PlayerInfo[playerid][pPass]); INI_Int("Cash",PlayerInfo[playerid][pCash]); INI_Int("Admin",PlayerInfo[playerid][pAdmin]); INI_Int("Kills",PlayerInfo[playerid][pKills]); INI_Int("Deaths",PlayerInfo[playerid][pDeaths]); INI_Int("Vip",PlayerInfo[playerid][pVip]); INI_Int("DJ",PlayerInfo[playerid][pDJ]); INI_Int("Banned",PlayerInfo[playerid][pBanned]); return 1; } main() { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); } #endif CMD:setmytime(playerid, params[]) { new time; if(PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, 0x0, "lol"); if(sscanf(params, "d", time)) { SendClientMessage(playerid, 0x0, "lol"); } return 1; }
Код:
main() { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); <--- the line }