shop help
#1

format(Primary[playerid], sizeof(Primary[playerid]), "M4A1");

Код:
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : error 001: expected token: "]", but found "-identifier-"
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : warning 215: expression has no effect
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : error 001: expected token: ";", but found "]"
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : error 029: invalid expression, assumed zero
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : fatal error 107: too many error messages on one line

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


4 Errors.
why the **** is this not working, on top of the script:

new Primary[MAX_PLAYERS][25];



It is for my shop, to show textdraws. If I use a normal format, it shows the textdraw for all with the same text, this is not right. It should only show the text for the player. It is for making custom classes.
Reply
#2

Quote:
Originally Posted by timothyinthehouse
Посмотреть сообщение
format(Primary[playerid], sizeof(Primary[playerid]), "M4A1");

Код:
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : error 001: expected token: "]", but found "-identifier-"
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : warning 215: expression has no effect
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : error 001: expected token: ";", but found "]"
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : error 029: invalid expression, assumed zero
C:\Users\Timothy\Desktop\0.3c rc8\gamemodes\CODVIIItest.pwn(3423) : fatal error 107: too many error messages on one line

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


4 Errors.
why the **** is this not working, on top of the script:

new Primary[MAX_PLAYERS][25];



It is for my shop, to show textdraws. If I use a normal format, it shows the textdraw for all with the same text, this is not right. It should only show the text for the player. It is for making custom classes.
Can you post lines 3422-3424
Reply
#3

Код:
public OnPlayerSelectedMenuRow(playerid, row)//shop
{
    TogglePlayerControllable(playerid,1);
	new Menu: Current = GetPlayerMenu(playerid);
	ShowMenuForPlayer(HIMenu,playerid);
	if(Current == HIMenu)
	{
		SetPlayerInterior(playerid,6);
		switch(row)
		{
			case 0:
      		{
				if(GetPlayerMoney(playerid) >= 15000)//m4
				{
				    if(m4text[playerid] == 1)
					{
					    ShowMenuForPlayer(HIMenu,playerid);
						return SendClientMessage(playerid, WHITE, "you already bought this weapon...");
					}
					GivePlayerMoney(playerid, -15000);
					ShowMenuForPlayer(HIMenu,playerid);
					TogglePlayerControllable(playerid,0);
					m4text[playerid] = 1;
					ak74textspawn[playerid] = 0;
					if(ak74text[playerid] == 1)
					{
						ak74text[playerid] = 0;
					}
					if(mp5text[playerid] == 1)
					{
						mp5text[playerid] = 0;
					}
					if(shotguntext[playerid] == 1)
					{
						shotguntext[playerid] = 0;
					}
					format(Primary[playerid], sizeof(Primary[playerid]), "M4A1");
    			}
				else
				{
    				SendClientMessage(playerid, WHITE, "You don't have enough money.");
    				ShowMenuForPlayer(HIMenu,playerid);
					TogglePlayerControllable(playerid,0);
				}
   			}
starting from line 3387
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)