C:\Samp Server01\pawno\include\dutils.inc(28) : error 021: symbol already defined: "isNumeric"
C:\Downloads\admin.pwn(146) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Des erstmal der Error.
Und zudem habe ich das gefühl das meine '.incs' irgendwie alle falsch sind :S, Ja ich habe die 0.3! Aber bei jedem wo ich compile immer wieder isNumeric definiert und so!
Und im Script ist nirgendswo isNumeric definiert -.-
Das komplette Script:
//[Includes]
#include <a_samp>
#include <dudb>
#include <dini>
#include <dutils>
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#pragma unused ret_memcpy
//[Variables]
new file[64];
new pname[MAX_PLAYER_NAME];
new Text:AA;
//[Colors]
#define green 0x33AA33AA
#define red 0xAA3333AA
#define blue 0x0000BBAA
//===============================[COMMANDS]=====================================
dcmd_ready(playerid, params[])
{
#pragma unused params
TextDrawShowForPlayer(playerid, AA);
dini_Create(file);
dini_Set(file, "Name" , pname);
TogglePlayerControllable(playerid, 0);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid, green,"Are you Male or Female ? (/gender [male] [female])");
return 1;
}
dcmd_gender(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: (/gender [male] [female])");
dini_Set(file, "Gender", params);
new string[128];
format(string, sizeof(string), "Ok, so you are %s.", params);
SendClientMessage(playerid, green,string);
SendClientMessage(playerid, green," ");
SendClientMessage(playerid, green,"What's your age ? (/age [Age])");
return 1;
}
dcmd_age(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /age [age]");
dini_Set(file, "Age", params);
new string[128];
format(string, sizeof(string), "Ok, so you are %s years old.", params);
SendClientMessage(playerid, green,string);
SendClientMessage(playerid, green," ");
SendClientMessage(playerid, green, "Ok. Where do you live ? (/country [Country's name])");
return 1;
}
dcmd_country(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: (/country [Country's name])");
dini_Set(file, "Country", params);
new string[128];
format(string, sizeof(string), "Ok, so you live in %s.", params);
SendClientMessage(playerid, green,string);
SendClientMessage(playerid, green," ");
SendClientMessage(playerid, green, "How will you deal a Cheater/Hacker ? (/deal [Message])");
return 1;
}
dcmd_deal(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: (/deal [Message])");
dini_Set(file, "Dealing with Cheaters", params);
SendClientMessage(playerid, green," ");
SendClientMessage(playerid, green, "Ok, Why would you like to be a Administrator ? (/reason [Reason])");
return 1;
}
dcmd_reason(playerid, params[])
{
TextDrawHideForPlayer(playerid, AA);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: (/reason [Reason])");
dini_Set(file, "Reason", params);
SendClientMessage(playerid, green," ");
SendClientMessage(playerid, green, "Ok, Thankyou. That was all the information we need right now!");
SendClientMessage(playerid, blue, "It might take some time, so please be patient!");
TogglePlayerControllable(playerid, 1);
return 1;
}
//==============================================================================
public OnFilterScriptInit()
{
AA = TextDrawCreate(155.000000,173.000000,"Admin Application!");
TextDrawAlignment(AA,1);
TextDrawBackgroundColor(AA,0x0000ff99);
TextDrawFont(AA,2);
TextDrawLetterSize(AA,0.799999,3.400000);
TextDrawColor(AA,0x00ff00cc);
TextDrawSetProportional(AA,1);
TextDrawSetShadow(AA,10);
return 1;
}
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, pname, sizeof pname);
format(file, sizeof file, "/Applications/%s.ini", pname);
if(fexist(file)) printf("Admin Application of %s already exists!", pname);
else SendClientMessage(playerid,green,"Want to apply for Administrator ? Type /adminapply for Application!");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(reason, 6, cmdtext);
dcmd(deal, 4, cmdtext);
dcmd(country, 7, cmdtext);
dcmd(gender, 6, cmdtext);
dcmd(ready, 5, cmdtext);
dcmd(age, 3, cmdtext);
//===[/Admin-Apply]===
if(strcmp(cmdtext, "/adminapply", true) == 0)
{
GetPlayerName(playerid, pname, sizeof pname);
format(file, sizeof file, "/Applications/%s.ini", pname);
if(fexist(file)) SendClientMessage(playerid, red, "ERROR: Your application already exists, Please be patient!");
if (!fexist(file)) return ready(playerid);
}
return 0;
}
forward ready(playerid);
public ready(playerid)
{
new string[128];
format(string, sizeof(string), "Hello %s. Welcome to Admin Application Form.", pname);
SendClientMessage(playerid, green,string);
SendClientMessage(playerid, green,"Type /ready when you are ready to fill the form!");
return 1;
}
//------------------------------------------------------------------------------
//================================[End Sub]=====================================
//------------------------------------------------------------------------------