1 freakin' error
#1

Sup

So I got 1 error. I never seen it before xD



PHP код:
C:\Documents and Settings\Uporabnik\Desktop\LSS-RP1\Los Santos Streets RolePlay\filterscripts\ban.pwn(40) : error 017undefined symbol "Date"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Yes i'M Making My Own Ban System


And The Code:


PHP код:
 format(stringbigsizeof(stringbig),"~r~Reason: ~w~ %s ~n~~r~Banned By: ~w~ %s ~n~~r~Date: ~w~ %d/%d/%s",reason,pName2,MonthDateYEAR_string); 
Ty
Reply
#2

Make sure you added "new Date;"

And you used:

"getdate(Day, Month, Year);" I guess "Day" is "Date" in your format.
Reply
#3

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Make sure you added "new Date;"

And you used:

"getdate(Day, Month, Year);" I guess "Day" is "Date" in your format.
THANKS SO MUCH!

Gonna Add Credits when i release FS
Reply
#4

Your welcome.

EDIT:

Hmm, I noticed this:

PHP код:
%d/%d/%s",reason,pName2,Month, Date, YEAR_string); 
It actually should be:

PHP код:
%d/%d/%d",reason,pName2,Month, Date, YEAR_string); 
Why did I change %s to %d?

Because "Date" is an integer not a string, remember that an Integer is a set of number(s).

%s = String.

%d = Integer.

%i = Integer.

%f = Float.

Floats are like this: "634.423". You can use them with "new Float: x" for example.

"new Float: x, Float: y, Float: z;"
"GetPlayerPos(playerid, x, y ,z);"
"new string[55];"
"format(string,sizeof(string), "Pos X : %f , Pos Y: %f , Pos Z: %f ", x, y, z);
"SendClientMessage(playerid, -1, string);"
"return 1;"

I hope you got it.
Reply
#5

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Your welcome.

EDIT:

Hmm, I noticed this:

PHP код:
%d/%d/%s",reason,pName2,Month, Date, YEAR_string); 
It actually should be:

PHP код:
%d/%d/%d",reason,pName2,Month, Date, YEAR_string); 
Why did I change %s to %d?

Because "Date" is an integer not a string, remember that an Integer is a set of number(s).

%s = String.

%d = Integer.

%i = Integer.

%f = Float.

Floats are like this: "634.423". You can use them with "new Float: x" for example.

"new Float: x, Float: y, Float: z;"
"GetPlayerPos(playerid, x, y ,z);"
"new string[55];"
"format(string,sizeof(string), "Pos X : %f , Pos Y: %f , Pos Z: %f ", x, y, z);
"SendClientMessage(playerid, -1, string);"
"return 1;"

I hope you got it.
you're right but for some reasons my command dont work!


PHP код:
//---Commands---//
dcmd_ban(playeridparams[]) {
     new 
pName[MAX_PLAYER_NAME] , pName2[MAX_PLAYER_NAME] , targetid reason[64] , string[128] , stringbig[256] , YEAR_string[5], YearMonthDay;
     
GetPlayerName(targetidpNamesizeof(pName));\
     
GetPlayerName(playeridpName2sizeof(pName2));
     
getdate(YearMonthDay);
     if(!
IsPlayerAdmin(playerid)) return 0;
     if(
sscanf(params"us[80]"targetid ,reason))  return SendClientMessage(playeridCOLOR_WHITE"SERVER: "COL_GREEN"/ban [playerid/partofname] [reason]");
     if(!
IsPlayerConnected(targetid)) return SendClientMessage(playeridCOLOR_WHITE"SERVER: "COL_RED" Player not connected or is yourself!");
     
format(stringsizeof(string), "SERVER: "COL_RED"%s "COL_GREEN"has been banned "COL_RED"(Reason: %s)",pNamereason);
     
SendClientMessageToAll(COLOR_WHITEstring);
     
format(YEAR_stringsizeof(YEAR_string), "%d"Year);
     
strdel(YEAR_string02);
     
format(stringbigsizeof(stringbig),"~r~Reason: ~w~ %s ~n~~r~Banned By: ~w~ %s ~n~~r~Date: ~w~ %d/%d/%d",reason,pName2,MonthDateYEAR_string);
     
TextDrawSetString(Info[playerid] , stringbig);
     
TextDrawShowForPlayer(playeridInfo[playerid]);
     
TextDrawShowForPlayer(playeridBox[playerid]);
     
TextDrawShowForPlayer(playeridBannedNotice[playerid]);
     
TextDrawShowForPlayer(playeridSite[playerid]);
     
Ban(targetid);
     return 
1;

:@ whats the problem ?


EDIT;

AND THIS;

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) {
     
dcmd(ban3cmdtext);
     return 
0;
}
public 
OnFilterScriptInit() {
     for(new 
playeridplayerid MAX_PLAYERSplayerid ++) {
         
Box[playerid] = TextDrawCreate(2.0000000.000000"~n~");
         
TextDrawBackgroundColor(Box[playerid], 255);
         
TextDrawFont(Box[playerid], 1);
         
TextDrawLetterSize(Box[playerid], 0.50000049.700004);
         
TextDrawColor(Box[playerid], -1);
         
TextDrawSetOutline(Box[playerid], 0);
         
TextDrawSetProportional(Box[playerid], 1);
         
TextDrawSetShadow(Box[playerid], 1);
         
TextDrawUseBox(Box[playerid], 1);
         
TextDrawBoxColor(Box[playerid], 255);
         
TextDrawTextSize(Box[playerid], 637.00000020.000000);
         
BannedNotice[playerid] = TextDrawCreate(120.000000129.000000"~r~You have been banned from the server");
         
TextDrawBackgroundColor(BannedNotice[playerid], 255);
         
TextDrawFont(BannedNotice[playerid], 1);
         
TextDrawLetterSize(BannedNotice[playerid], 0.6000005.000000);
         
TextDrawColor(BannedNotice[playerid], -1);
         
TextDrawSetOutline(BannedNotice[playerid], 0);
         
TextDrawSetProportional(BannedNotice[playerid], 1);
         
TextDrawSetShadow(BannedNotice[playerid], 1);
         
Info[playerid] = TextDrawCreate(182.000000207.000000"~r~Reason: ~w~ ~n~~r~Banned By: ~w~ ~n~~r~Date: ~w~ ");
         
TextDrawBackgroundColor(Info[playerid], 255);
         
TextDrawFont(Info[playerid], 1);
         
TextDrawLetterSize(Info[playerid], 0.5000001.800000);
         
TextDrawColor(Info[playerid], -1);
         
TextDrawSetOutline(Info[playerid], 0);
         
TextDrawSetProportional(Info[playerid], 1);
         
TextDrawSetShadow(Info[playerid], 1);
         
TextDrawUseBox(Info[playerid], 1);
         
TextDrawBoxColor(Info[playerid], 1681016400);
         
TextDrawTextSize(Info[playerid], 410.000000, -30.000000);
         
Site[playerid] = TextDrawCreate(20.000000420.000000"Please take a picture of this by pressing ~g~ F8 ~w~ and post it at ~r~www.yoursite.com");
         
TextDrawBackgroundColor(Site[playerid], 255);
         
TextDrawFont(Site[playerid], 1);
         
TextDrawLetterSize(Site[playerid], 0.4000001.000000);
         
TextDrawColor(Site[playerid], -1);
         
TextDrawSetOutline(Site[playerid], 0);
         
TextDrawSetProportional(Site[playerid], 1);
         
TextDrawSetShadow(Site[playerid], 1);
     }
     return 
1;

Why dafaq wont work!
Reply
#6

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) { 
     
dcmd(ban3cmdtext); 
     return 
0

You should "return 1" instead of "return 0".

And that's not how you use Dcmd.

No need to add "dcmd(ban, 3, cmdtext);" cause it won't even work.
Reply
#7

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
PHP код:
public OnPlayerCommandText(playeridcmdtext[]) { 
     
dcmd(ban3cmdtext); 
     return 
0

You should "return 1" instead of "return 0".

And that's not how you use Dcmd.

No need to add "dcmd(ban, 3, cmdtext);" cause it won't even work.
Now no cmd work xD everything is broke
Reply
#8

Sorry but I don't know what's wrong then :L
Reply
#9

:L

And i cant release buggy script can i ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)