SA-MP Forums Archive
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)
+--- Thread: Help (/showthread.php?tid=640479)



Help - StrikerZ - 03.09.2017

For example
PHP код:
public OnGameModeInit()
{
 function();
}
function()
{

If I define the function later on, I get undefined symbol error, I remember this shouldn't occur, but it does, any help?


Re: Help - Kane - 03.09.2017

Show what you're trying to do exactly and the errors you get.


Re: Help - StrikerZ - 03.09.2017

I mean if I define the function later on in script, for example below, and call the function earlier somewhere, I get the undefined symbol "function name" error.


Re: Help - 10MIN - 03.09.2017

Are you sure you use the correct compiler?
You can use the compiler from the Server Package, Zeex's compiler or the russian compiler.


Re: Help - StrikerZ - 03.09.2017

Quote:
Originally Posted by 10MIN
Посмотреть сообщение
Are you sure you use the correct compiler?
You can use the compiler from the Server Package, Zeex's compiler or the russian compiler.
Well, I'm not gonna use that russian complier at any cost, who knows what might it has.


Re: Help - kAn3 - 03.09.2017

Код:
#include a_samp 

main()
{
	printf("Hello");
	f();
}

f()
{
	
}
I've just tried this and it works fine


Re: Help - StrikerZ - 04.09.2017

Quote:
Originally Posted by kAn3
Посмотреть сообщение
Код:
#include a_samp 

main()
{
	printf("Hello");
	f();
}

f()
{
	
}
I've just tried this and it works fine
That's what I'm saying. It shouldn't happen but it does happen.


Re: Help - coool - 04.09.2017

Do you have other functions too and they work fine?
This also occurs when a bracket is missing.


Re: Help - StrikerZ - 05.09.2017

Quote:
Originally Posted by coool
Посмотреть сообщение
Do you have other functions too and they work fine?
This also occurs when a bracket is missing.
I used missing bracket's finder and yes 2 brackets were missing, and I successfully fixed them. But now the compiler crashes and I've no clue.