[HELP] Fix Error 017: Undefined Sysmbol"string"
#1

Код:
 	new playerIP[16];
	GetPlayerIp(playerid, playerIP, sizeof(playerIP));
	if (CheckBan(playerIP) == 1)
	{
    	format(string, sizeof(string), "Akun atau IP anda telah di banned!\n\nAccount: %s\nIP: %s\nDi banned oleh: %s \nAlasan: %s \nPada Waktu: %s | Tanggal: %s\n\nSihlakan Post forum bagian unban request",GetPlayerNameEx(playerid),PlayerInfo[playerid][pIP],PlayerInfo[playerid][pAdminban],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBanExpired],PlayerInfo[playerid][pBanExpired2]);
		ShowPlayerDialog(playerid,BAN_DIALOG,DIALOG_STYLE_MSGBOX,"BANNED",string,"OK","");
		//SetPlayerName(playerid, "BannedPlayer");
  		//Kick(playerid);
		return 1;
	}
why error ?
i added CMD /ban , error detect.
please help me for this problem?

Код:
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(814) : warning 203: symbol is never used: "modelindex"
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(4248) : warning 204: symbol is assigned a value that is never used: "string"
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(4333) : warning 203: symbol is never used: "seek"
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(4363) : warning 203: symbol is never used: "seek"
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(8925) : error 017: undefined symbol "string"
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(8925) : error 017: undefined symbol "string"
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(8925) : error 029: invalid expression, assumed zero
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(8925) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

you have to make your format output defined
replace this with yours
Quote:

new playerIP[16];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
new string[1050];
format(string, sizeof(string), "Akun atau IP anda telah di banned!\n\nAccount: %s\nIP: %s\nDi banned oleh: %s \nAlasan: %s \nPada Waktu: %s | Tanggal: %s\n\nSihlakan Post forum bagian unban request",GetPlayerNameEx(playerid),PlayerInfo[playerid][pIP],PlayerInfo[playerid][pAdminban],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBanExpired],PlayerInfo[playerid][pBanExpired2]);
ShowPlayerDialog(playerid,BAN_DIALOG,DIALOG_STYLE_ MSGBOX,"BANNED",string,"OK","");
//SetPlayerName(playerid, "BannedPlayer");
//Kick(playerid);
return 1;
}

put new string[1050]; at the top of format
Reply
#3

Код:
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(67318) : warning 204: symbol is assigned a value that is never used: "string"
Reply
#4

Quote:
Originally Posted by Elanggg
Посмотреть сообщение
Код:
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(67318) : warning 204: symbol is assigned a value that is never used: "string"
Код:
new playerIP[32];
GetPlayerIp(playerid,playerIP,sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
new string[1050];
format(string,sizeof(string),"Akun atau IP anda telah di banned!\n\nAccount: %s\nIP: %s\nDi banned oleh: %s \nAlasan: %s \nPada Waktu: %s | Tanggal: %s\n\nSihlakan Post forum bagian unban request",GetPlayerNameEx(playerid),playerIP,PlayerInfo[playerid][pAdminban],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBanExpired],PlayerInfo[playerid][pBanExpired2]);
ShowPlayerDialog(playerid,12,DIALOG_STYLE_ MSGBOX,"BANNED",string,"OK","");
// place kick in dialo g responce
Kick(playerid);
return 1;
}
Reply
#5

****** will only Explain
Give him a Solution
Reply
#6

Quote:
Originally Posted by lonalovegood1
Посмотреть сообщение
Код:
new playerIP[32];
GetPlayerIp(playerid,playerIP,sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
new string[1050];
format(string,sizeof(string),"Akun atau IP anda telah di banned!\n\nAccount: %s\nIP: %s\nDi banned oleh: %s \nAlasan: %s \nPada Waktu: %s | Tanggal: %s\n\nSihlakan Post forum bagian unban request",GetPlayerNameEx(playerid),playerIP,PlayerInfo[playerid][pAdminban],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBanExpired],PlayerInfo[playerid][pBanExpired2]);
ShowPlayerDialog(playerid,12,DIALOG_STYLE_ MSGBOX,"BANNED",string,"OK","");
// place kick in dialo g responce
Kick(playerid);
return 1;
}
edit new string[1050]; to new string[256]; if it didn't work try this:
Код:
new playerIP[32];
GetPlayerIp(playerid,playerIP,sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
new string[256];
format(string,sizeof(string),"Akun atau IP anda telah di banned!\n\nAccount: %s\nIP: %s\nDi banned oleh: %s \nAlasan: %s \nPada Waktu: %s | Tanggal: %s\n\nSihlakan Post forum bagian unban request",GetPlayerNameEx(playerid),playerIP,PlayerInfo[playerid][pAdminban],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBanExpired],PlayerInfo[playerid][pBanExpired2]);
ShowPlayerDialog(playerid,12,DIALOG_STYLE_ MSGBOX,"BANNED",string,"OK","");
print(string);
// place kick in dialo g responce
Kick(playerid);
return 1;
}
Reply
#7

Quote:
Originally Posted by Eth
Посмотреть сообщение
edit new string[1050]; to new string[256]; if it didn't work try this:
Код:
new playerIP[32];
GetPlayerIp(playerid,playerIP,sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
new string[256];
format(string,sizeof(string),"Akun atau IP anda telah di banned!\n\nAccount: %s\nIP: %s\nDi banned oleh: %s \nAlasan: %s \nPada Waktu: %s | Tanggal: %s\n\nSihlakan Post forum bagian unban request",GetPlayerNameEx(playerid),playerIP,PlayerInfo[playerid][pAdminban],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBanExpired],PlayerInfo[playerid][pBanExpired2]);
ShowPlayerDialog(playerid,12,DIALOG_STYLE_ MSGBOX,"BANNED",string,"OK","");
print(string);
// place kick in dialo g responce
Kick(playerid);
return 1;
}
theres an string more than 512 characters !
so ...
Reply
#8

You can use a ******'s include from YSI called y_va just on top of script put
Код:
#include <YSI\y_va>
and with other stock's put this:
Код:
stock va_ShowPlayerDialog(playerid, dialogid, style, caption[], const info[], button1[], button2[], va_args<>)
{
	new fmat[800];
	va_format(fmat, sizeof(fmat), info, va_start<7>);
	return ShowPlayerDialog(playerid, dialogid, style, caption, fmat, button1, button2);
}
and your code is:

Код:
new playerIP[32];
GetPlayerIp(playerid,playerIP,sizeof(playerIP));
if (CheckBan(playerIP) == 1)
{
va_ShowPlayerDialog(playerid,12,DIALOG_STYLE_MSGBOX,"BANNED","Akun atau IP anda telah di banned!\n\nAccount: %s\nIP: %s\nDi banned oleh: %s\nAlasan: %s\nPada Waktu: %s | Tanggal: %s\n\nSihlakan Post forum bagian unban request","OK","", GetPlayerNameEx(playerid),playerIP,PlayerInfo[playerid][pAdminban],PlayerInfo[playerid][pBanReason],PlayerInfo[playerid][pBanExpired],PlayerInfo[playerid][pBanExpired2]);
// place kick in dialo g responce
Kick(playerid);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)