SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/04/2014, 07:58 AM   #1
Elanggg
Little Clucker
 
Elanggg's Avatar
 
Join Date: Feb 2014
Posts: 46
Reputation: 4
Default [HELP] Fix Error 017: Undefined Sysmbol"string"

Code:
 	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?

Code:
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 (c) 1997-2006, ITB CompuPhase


4 Errors.
Elanggg is offline   Reply With Quote
Old 27/04/2014, 08:00 AM   #2
lonalovegood1
Big Clucker
 
lonalovegood1's Avatar
 
Join Date: Sep 2013
Location: Bolton, Manchester, UK
Posts: 58
Reputation: 1
Default Re: [HELP] Fix Error 017: Undefined Sysmbol"string"

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
__________________
First Just +Rep Me
Last Enjoy My Posts
Zendegi Majazi Iran [RP] Server
lonalovegood1 is offline   Reply With Quote
Old 27/04/2014, 08:27 AM   #3
Elanggg
Little Clucker
 
Elanggg's Avatar
 
Join Date: Feb 2014
Posts: 46
Reputation: 4
Default Re: [HELP] Fix Error 017: Undefined Sysmbol"string"

Code:
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(67318) : warning 204: symbol is assigned a value that is never used: "string"
__________________
Sorry For Bad my English.
Elanggg is offline   Reply With Quote
Old 27/04/2014, 08:40 AM   #4
lonalovegood1
Big Clucker
 
lonalovegood1's Avatar
 
Join Date: Sep 2013
Location: Bolton, Manchester, UK
Posts: 58
Reputation: 1
Default Re: [HELP] Fix Error 017: Undefined Sysmbol"string"

Quote:
Originally Posted by Elanggg View Post
Code:
G:\FOLDER~1\gta\GAMEMO~1\RP.pwn(67318) : warning 204: symbol is assigned a value that is never used: "string"
Code:
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;
}
__________________
First Just +Rep Me
Last Enjoy My Posts
Zendegi Majazi Iran [RP] Server
lonalovegood1 is offline   Reply With Quote
Old 27/04/2014, 08:42 AM   #5
lonalovegood1
Big Clucker
 
lonalovegood1's Avatar
 
Join Date: Sep 2013
Location: Bolton, Manchester, UK
Posts: 58
Reputation: 1
Default Re: [HELP] Fix Error 017: Undefined Sysmbol"string"

****** will only Explain
Give him a Solution
__________________
First Just +Rep Me
Last Enjoy My Posts
Zendegi Majazi Iran [RP] Server
lonalovegood1 is offline   Reply With Quote
Old 27/04/2014, 08:47 AM   #6
Eth
Gangsta
 
Eth's Avatar
 
Join Date: Sep 2013
Location: Egypt,مصر
Posts: 791
Reputation: 72
Default Re: [HELP] Fix Error 017: Undefined Sysmbol"string"

Quote:
Originally Posted by lonalovegood1 View Post
Code:
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:
Code:
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;
}
__________________
Left SAMP, yes..For real
Born on : 2000, 04, 12
Eth is offline   Reply With Quote
Old 27/04/2014, 08:51 AM   #7
lonalovegood1
Big Clucker
 
lonalovegood1's Avatar
 
Join Date: Sep 2013
Location: Bolton, Manchester, UK
Posts: 58
Reputation: 1
Default Re: [HELP] Fix Error 017: Undefined Sysmbol"string"

Quote:
Originally Posted by Eth View Post
edit new string[1050]; to new string[256]; if it didn't work try this:
Code:
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 ...
__________________
First Just +Rep Me
Last Enjoy My Posts
Zendegi Majazi Iran [RP] Server
lonalovegood1 is offline   Reply With Quote
Old 27/04/2014, 09:00 AM   #8
R4PlaY
Little Clucker
 
R4PlaY's Avatar
 
Join Date: Mar 2013
Location: Bosnia
Posts: 19
Reputation: 9
Default Re: [HELP] Fix Error 017: Undefined Sysmbol"string"

You can use a ******'s include from YSI called y_va just on top of script put
Code:
#include <YSI\y_va>
and with other stock's put this:
Code:
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:

Code:
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;
}
__________________
REP+ if I helped you.
R4PlaY is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
It said "Undefined sysmbol" but its defined ChristianIvann09 Scripting Help 3 19/04/2014 02:52 PM
error 017: undefined symbol "string" vn007322815 Scripting Help 5 28/12/2013 07:35 AM
error 017: undefined symbol "string" MoNsTeR_EnErGy Scripting Help 4 10/09/2012 10:17 AM
Error 017: undefined symbol "string" MrSnapp Scripting Help 5 24/08/2012 11:19 AM


All times are GMT. The time now is 06:22 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.