A error i get alot, for some reason
#1

Look at this code:

Код:
teleportmenu = CreateMenu("Teleportmenu", 2, 200.0, 100.0, 150.0, 150.0);
Код:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

{
	teleportmenu = CreateMenu("TeleportMenu", 2, 200.0, 100.0, 150.0, 150.0);
And that is my code, and then i get this error:

Код:
C:\Users\Alex\Desktop\Spil\GetRaped.pwn(41) : error 055: start of function body without function header
And this is my line 41:

Код:
{
Reply
#2

You just randomly stuck teleportmenu = CreateMenu("Teleportmenu", 2, 200.0, 100.0, 150.0, 150.0); in the middle of nowhere, try putting it under OnGameModeInit.
Reply
#3

Thanks, but now i get another error..

Код:
C:\Users\Alex\Desktop\Spil\GetRaped.pwn(39) : error 017: undefined symbol "teleportmenu"
And line 39 ->

Код:
teleportmenu = CreateMenu("teleportmenu", 2, 200.0, 100.0, 150.0, 150.0);
And this is my top of the script:

Код:
#include <a_samp>

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#if defined FILTERSCRIPT
new Menu:teleportmenu;
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}
So it should work, because i put new Menu:teleportmenu;
Reply
#4

put
Код:
new Menu:teleportmenu;
above
Код:
#if defined FILTERSCRIPT
Reply
#5

And now it works, thanks for the help guys, really.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)