'Itter_OnGameModeInit'
#1

I keep getting 'Itter_OnGameModeInit' as an error whilst coding, it says that it's already a function, but when I search for it, it's nowhere to be found, is there any way around this?

PHP код:
error 021symbol already defined"Itter_OnGameModeInit" 
Reply
#2

maybe you have multiple 'OnGameModeInit' callbacks in your gamemode (with the same name)?
Reply
#3

Pretty sure that's foreach's hook for OnGameModeInit. Make sure you have only got foreach defined once, and I'm pretty sure if you have included YSI then you don't need to include foreach.
Reply
#4

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Pretty sure that's foreach's hook for OnGameModeInit. Make sure you have only got foreach defined once, and I'm pretty sure if you have included YSI then you don't need to include foreach.
Pawn lets you include your includes only once (unless you'll undefine '_inc_includename'). Callback 'Itter_OnGameModeInit' is renamed to 'OnGameModeInit' so, when you are using 'OnGameModeInit' in your gamemode, you are actually using 'Itter_OnGameModeInit'. If you have defined same callback in your script multiple times, you get that error message.
Reply
#5

Quote:
Originally Posted by Scottas
Посмотреть сообщение
Pawn lets you include your includes only once (unless you'll undefine '_inc_includename'). Callback 'Itter_OnGameModeInit' is renamed to 'OnGameModeInit' so, when you are using 'OnGameModeInit' in your gamemode, you are actually using 'Itter_OnGameModeInit'. If you have defined same callback in your script multiple times, you get that error message.
Ahh, you're right here. Just realised reading over it again that it would return all the functions are already defined if it was actually included multiple times. I've seen a lot of cases of

pawn Код:
#include <Foreach>
#include <foreach>
And the compiler would think that they're two separate files but load the same file but this isn't the case here. It is going to be just multiple OnGameModeInit's in the same script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)