SA-MP Forums Archive
Problem to compile.[MENU 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: Problem to compile.[MENU HELP] (/showthread.php?tid=254683)



Problem to compile.[MENU HELP] - Gauloises - 12.05.2011

Wheres the prob?
Код HTML:
public OnPlayerSelectedMenuRow(playerid, row)
{
	new Menu:Current;
	Current = GetPlayerMenu(playerid);
	if(Current == HomeMenu)
    {
		switch(row)
		{
			case 0: OnPlayerCommandText(playerid,"/ianhome");
		}
	}
	if(Current == SkillMenu)
	{
		switch(row)
		{
			case 0: OnPlayerCommandText(playerid,"/drift 1);
			case 1: OnPlayerCommandText(playerid,"/drift 2);
			case 2: OnPlayerCommandText(playerid,"/drift 3);
			case 3: OnPlayerCommandText(playerid,"/lvap);
			case 4: OnPlayerCommandText(playerid,"/lsap);
			case 5: OnPlayerCommandText(playerid,"/sfap);
			case 6: OnPlayerCommandText(playerid,"/skatepark);
		}
	}
	return 1;
}
Код HTML:
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21814) : error 037: invalid string (possibly non-terminated string)
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21814) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21814) : warning 215: expression has no effect
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21815) : error 014: invalid statement; not in switch
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21815) : warning 215: expression has no effect
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21815) : error 001: expected token: ";", but found ":"
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21815) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Ian\Desktop\mnu\New.pwn(21815) : fatal error 107: too many error messages on one line



Re: Problem to compile.[MENU HELP] - Noah_Roufus - 12.05.2011

To me it looks as if you have forgotten a bracket in the function above it. Possible a semicolon as well. Check the surrounding functions for errors.


Re: Problem to compile.[MENU HELP] - iJumbo - 12.05.2011

wich line is 21815 ?


you cant use OnPlayerCommandText as a function is a callback


Re: Problem to compile.[MENU HELP] - AK47317 - 12.05.2011

pawn Код:
public OnPlayerCommandText
this is not a function that can use everything, but it is a callback


Re: Problem to compile.[MENU HELP] - Cameltoe - 12.05.2011

Don't you guys see that he is missing end quotes?

Calling callbacks is possible btw, that's the purpose of them.


AW: Re: Problem to compile.[MENU HELP] - Gauloises - 12.05.2011

Quote:
Originally Posted by [ISS]jumbo
Посмотреть сообщение
wich line is 21815 ?


you cant use OnPlayerCommandText as a function is a callback
the 21815 line is
Код HTML:
 case 1: OnPlayerCommandText(playerid,"/drift 2);
Uhm..ive tested the HomeMenu and it works.how come?

help


Re: AW: Re: Problem to compile.[MENU HELP] - Cameltoe - 12.05.2011

Код HTML:
 case 1: OnPlayerCommandText(playerid,"/drift 2");
You were missing the end quote ( " )


AW: Problem to compile.[MENU HELP] - Gauloises - 12.05.2011

Oh Fuck! lmfao
Thank ya ^^


Re: Problem to compile.[MENU HELP] - lowrida018 - 12.05.2011

Lol, I was going to say that, until I saw that post.


Re: Problem to compile.[MENU HELP] - AK47317 - 12.05.2011

Quote:
Originally Posted by lowrida018
Посмотреть сообщение
Lol, I was going to say that, until I saw that post.
dint saw that code were..