SA-MP Forums Archive
String Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: String Help (/showthread.php?tid=113985)



String Help - CharlieScene - 17.12.2009

Tell me what is wronge with this

Код:
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
					{
					  new currank[64];
  					if(PlayerInfo[playerid][pRank] == 1) { currank = "Cadet"; }
						else if(PlayerInfo[playerid][pRank] == 2) { currank = "Officer"; }
						else if(PlayerInfo[playerid][pRank] == 3) { currank = "Senior Officer"; }
						else if(PlayerInfo[playerid][pRank] == 4) { currank = "Sergeant"; }
						else if(PlayerInfo[playerid][pRank] == 5) { currank = "Lieutenant"; }
						else if(PlayerInfo[playerid][pRank] == 6) { currank = "Captain"; }
						else if(PlayerInfo[playerid][pRank] == 7) { currank = "Deputy Chief"; }
	    			else if(PlayerInfo[playerid][pRank] == 8) { currank = "Chief"; }
						else { currank = "Cadet"; }
						format(string, sizeof(string), "Welcome To Duty %s", currank);
						SendClientMessage(playerid,COLOR_GREEN1337,string)
					}


and i get

Код:
C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : error 017: undefined symbol "string"
C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : error 017: undefined symbol "string"
C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : error 029: invalid expression, assumed zero
C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: String Help - bigcomfycouch - 17.12.2009

add
Код:
new string[128];
under
Код:
new currank[64];



Re: String Help - CharlieScene - 17.12.2009

Код:
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
					{
					  new currank[64];
					  new string[128];
  					if(PlayerInfo[playerid][pRank] == 1) { currank = "Cadet"; }
						else if(PlayerInfo[playerid][pRank] == 2) { currank = "Officer"; }
						else if(PlayerInfo[playerid][pRank] == 3) { currank = "Senior Officer"; }
						else if(PlayerInfo[playerid][pRank] == 4) { currank = "Sergeant"; }
						else if(PlayerInfo[playerid][pRank] == 5) { currank = "Lieutenant"; }
						else if(PlayerInfo[playerid][pRank] == 6) { currank = "Captain"; }
						else if(PlayerInfo[playerid][pRank] == 7) { currank = "Deputy Chief"; }
	    			else if(PlayerInfo[playerid][pRank] == 8) { currank = "Chief"; }
						else { currank = "Cadet"; }
						format(string, sizeof(string), "Welcome To Duty %s", currank);
						SendClientMessage(playerid,COLOR_GREEN1337, string);


I still get

C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : error 017: undefined symbol "string"
C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : error 017: undefined symbol "string"
C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : error 029: invalid expression, assumed zero
C:\Users\S Alpha\Desktop\NewScripts\gamemodes\fray.pwn(6305) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: String Help - CharlieScene - 17.12.2009

can anyone help me ?


Re: String Help - Ironboy500 - 17.12.2009

Can you give me code from line "6305"?


Re: String Help - *ToM* - 17.12.2009

pawn Код:
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
                    {
                      new currank[64];
                      new string[128];
                    if(PlayerInfo[playerid][pRank] == 1) { currank = "Cadet"; }
                        else if(PlayerInfo[playerid][pRank] == 2) { currank = "Officer"; }
                        else if(PlayerInfo[playerid][pRank] == 3) { currank = "Senior Officer"; }
                        else if(PlayerInfo[playerid][pRank] == 4) { currank = "Sergeant"; }
                        else if(PlayerInfo[playerid][pRank] == 5) { currank = "Lieutenant"; }
                        else if(PlayerInfo[playerid][pRank] == 6) { currank = "Captain"; }
                        else if(PlayerInfo[playerid][pRank] == 7) { currank = "Deputy Chief"; }
                    else if(PlayerInfo[playerid][pRank] == 8) { currank = "Chief"; }
                        else { currank = "Cadet"; }
                        new string[128];
                        format(string, sizeof(string), "Welcome To Duty %s", currank);
                        SendClientMessage(playerid,COLOR_GREEN1337, string);
should work, sorry for bad indetation, fuckin Pawn option messed it up


Re: String Help - CharlieScene - 18.12.2009

Thx ^^ It worked....