SA-MP Forums Archive
Whirpool Installation Problem. - 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: Whirpool Installation Problem. (/showthread.php?tid=379917)



(fixed) - MrPlatinum - 23.09.2012

This has been fixed.


Re: Whirpool Installation Problem. - mobiliz - 23.09.2012

Have you got 2 main's?


Re: Whirpool Installation Problem. - MrPlatinum - 23.09.2012

Yes there's one directly below that,

Код HTML:
// The main function (used only once when the server loads)
main()
{
	// Print some standard lines to the server's console
	print("\n----------------------------------");
	print(GameModeName);
	print("----------------------------------\n");
}



Re: Whirpool Installation Problem. - clarencecuzz - 23.09.2012

You can only have one main() function in your script, otherwise it's like defining OnPlayerConnect or OnPlayerSpawn twice.


Re: Whirpool Installation Problem. - MrPlatinum - 23.09.2012

Okay, so i got rid of main() and this is what i got when i tried to compile.

Код HTML:
C:\Users\Brandon\Desktop\SERVER\pawno\include\dutils.inc(410) : warning 219: local variable "buf" shadows a variable at a preceding level
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(70) : error 055: start of function body without function header
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(73) : error 021: symbol already defined: "printf"
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(1476) : warning 203: symbol is never used: "buf"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Whirpool Installation Problem. - Glint - 23.09.2012

Quote:
Originally Posted by MrPlatinum
Посмотреть сообщение
Okay, so i got rid of main() and this is what i got when i tried to compile.

Код HTML:
C:\Users\Brandon\Desktop\SERVER\pawno\include\dutils.inc(410) : warning 219: local variable "buf" shadows a variable at a preceding level
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(70) : error 055: start of function body without function header
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(73) : error 021: symbol already defined: "printf"
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(1476) : warning 203: symbol is never used: "buf"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Just change "buf" to "buffer" and try it.


Re: Whirpool Installation Problem. - MrPlatinum - 23.09.2012

Код HTML:
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(70) : error 055: start of function body without function header
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(73) : error 021: symbol already defined: "printf"
C:\Users\Brandon\Desktop\SERVER\gamemodes\PPC_Trucking.pwn(1476) : warning 203: symbol is never used: "buffer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Whirpool Installation Problem. - Glint - 23.09.2012

Show us the lines.


Re: Whirpool Installation Problem. - MrPlatinum - 23.09.2012

Код HTML:
native WP_Hash(buffer[], len, const str[]);

{
    new
    	buffer[129];
    printf("hash");
    WP_Hash(buf, sizeof (buf), "The quick brown fox jumps over the lazy dog");
    print(buf);
}