String Help
#1

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.
Reply
#2

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

Код:
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.
Reply
#4

can anyone help me ?
Reply
#5

Can you give me code from line "6305"?
Reply
#6

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
Reply
#7

Thx ^^ It worked....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)