Error with Dialogs
#1

Here Is My "ShowPlayerDialog" Code:

Код:
ShowPlayerDialog(playerid,3110201,DIALOG_STYLE_MSGBOX,"Admin Level 6 Commands","{FF0000} ~ Server Owner | Founder ~{FFFFFF}\n/ac, /asay, /freeze, /unfreeze, /mute, /unmute, /kick, /checkplayer, /clear, /weather, /spectate, /stopspec, /reports\n/disarm, /transfer, /unbug, /goto, /get, /tempban, /ban, /resetcash, /resetbank, /vrespawn, /sethealth, /setarmour, /teleplayer\n/br, /transfer, /addsong, /delsong, /orgkick, /setleader, /kickleader, /leaderlist, /resetorg, /giveallweapon, /disarmall\n/setsmember, /banip, /unbanip, /v, /setcolor, /setskin, /setpres, /kickpres /repair, /flip, /flipcar, /glic, /setadmin, /setadminuc\n/exit, /pos, /setvip, /setscore, /armourall, /healall, /setallcash, /records, /setapass, /write, /listen, /dmisland, /hvip, /svip\n/getip, /setmoney, /givemoney, /awant, /jetpack, /playmusic, /addsong, /delsong, /gotopos, /dyhelp\n\n~{FF0000} RCON Admin Commands{FFFFFF} ~\n{FF0000}Board Commands:{FFFFFF} /createboard /editbfsize /editbtext /editbpos /gotoboard /deleteboard\n{FF0000}Disable Commands:{FFFFFF} /disablelist /disablecommand /unblockcommand\n{FF0000}Additional Commands{FFFFFF} /botsay","Okay","");
Everything:

Код:
	if(adlvl[playerid] == 6)
	{
		ShowPlayerDialog(playerid,3110201,DIALOG_STYLE_MSGBOX,"Admin Level 6 Commands","{FF0000} ~ Server Owner | Founder ~{FFFFFF}\n/ac, /asay, /freeze, /unfreeze, /mute, /unmute, /kick, /checkplayer, /clear, /weather, /spectate, /stopspec, /reports\n/disarm, /transfer, /unbug, /goto, /get, /tempban, /ban, /resetcash, /resetbank, /vrespawn, /sethealth, /setarmour, /teleplayer\n/br, /transfer, /addsong, /delsong, /orgkick, /setleader, /kickleader, /leaderlist, /resetorg, /giveallweapon, /disarmall\n/setsmember, /banip, /unbanip, /v, /setcolor, /setskin, /setpres, /kickpres /repair, /flip, /flipcar, /glic, /setadmin, /setadminuc\n/exit, /pos, /setvip, /setscore, /armourall, /healall, /setallcash, /records, /setapass, /write, /listen, /dmisland, /hvip, /svip\n/getip, /setmoney, /givemoney, /awant, /jetpack, /playmusic, /addsong, /delsong, /gotopos, /dyhelp\n\n~{FF0000} RCON Admin Commands{FFFFFF} ~\n{FF0000}Board Commands:{FFFFFF} /createboard /editbfsize /editbtext /editbpos /gotoboard /deleteboard\n{FF0000}Disable Commands:{FFFFFF} /disablelist /disablecommand /unblockcommand\n{FF0000}Additional Commands{FFFFFF} /botsay","Okay","");
		return 1;
	}
I Get This Error:

Код:
C:\Users\Immortal\Desktop\Desktop\rLg Edit\gamemodes\EliteGaming.pwn(23774) : error 075: input line too long (after substitutions)
C:\Users\Immortal\Desktop\Desktop\rLg Edit\gamemodes\EliteGaming.pwn(23775) : error 037: invalid string (possibly non-terminated string)
C:\Users\Immortal\Desktop\Desktop\rLg Edit\gamemodes\EliteGaming.pwn(23775) : error 017: undefined symbol "FF0000"
C:\Users\Immortal\Desktop\Desktop\rLg Edit\gamemodes\EliteGaming.pwn(23775) : error 017: undefined symbol "Server"
C:\Users\Immortal\Desktop\Desktop\rLg Edit\gamemodes\EliteGaming.pwn(23775) : fatal error 107: too many error messages on one line

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


5 Errors.
Reply
#2

Check these topics out:
https://sampforum.blast.hk/showthread.php?tid=319744
https://sampforum.blast.hk/showthread.php?tid=343101
https://sampforum.blast.hk/showthread.php?tid=338181
https://sampforum.blast.hk/showthread.php?tid=280099

There are a lot more. ******: "SAMP" followed by the error you're getting and 99% of the time the error has been fixed in an already existing help topic.
Reply
#3

Thanks but there is one more thing

My Code Now:

Код:
		new string[952];
		strcat(string, "{FF0000} ~ Server Owner | Founder ~{FFFFFF}\n");
		strcat(string, "/ac, /asay, /freeze, /unfreeze, /mute, /unmute, /kick, /checkplayer, /clear, /weather, /spectate, /stopspec, /reports\n");
		strcat(string, "/disarm, /transfer, /unbug, /goto, /get, /tempban, /ban, /resetcash, /resetbank, /vrespawn, /sethealth, /setarmour, /teleplayer\n");
		strcat(string, "/br, /transfer, /addsong, /delsong, /orgkick, /setleader, /kickleader, /leaderlist, /resetorg, /giveallweapon, /disarmall\n");
		strcat(string, "/setsmember, /banip, /unbanip, /v, /setcolor, /setskin, /setpres, /kickpres /repair, /flip, /flipcar, /glic, /setadmin, /setadminuc\n");
		strcat(string, "/exit, /pos, /setvip, /setscore, /armourall, /healall, /setallcash, /records, /setapass, /write, /listen, /dmisland, /hvip, /svip\n");
		strcat(string, "/getip, /setmoney, /givemoney, /awant, /jetpack, /playmusic, /addsong, /delsong, /gotopos, /dyhelp\n");
		strcat(string, "~{FF0000} RCON Admin Commands{FFFFFF} ~\n");
		strcat(string, "{FF0000}Board Commands:{FFFFFF} /createboard /editbfsize /editbtext /editbpos /gotoboard /deleteboard\n");
		strcat(string, "{FF0000}Disable Commands:{FFFFFF} /disablelist /disablecommand /unblockcommand\n");
		ShowPlayerDialog(playerid,3110201,DIALOG_STYLE_MSGBOX, "Admin Lvl 6 Commands", string, "Okay", "");
By Disable Commands it only shows the /d and not the hole line

Reply
#4

Your string variable doesn't have enough cells. Your string is 1003 characters long (excluding \0; so technically 1004). Including '\0', you need 1004 cells to hold that.
Reply
#5

Can you help me fix that?
Reply
#6

Change:
PHP код:
new string[952]; 
To:
PHP код:
new string[1004]; 
The number between the square brackets is the amount of cells of an array variable. One cell can hold 1 character, the reason why is because each character represents a different number (see ASCII table: http://www.asciitable.com/).
Reply
#7

Thanks it worked perfectly + rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)