SA-MP Forums Archive
OnPlayerSpawn already defined - 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: OnPlayerSpawn already defined (/showthread.php?tid=633588)



OnPlayerSpawn already defined - aoky - 03.05.2017

Код:
(974) : error 021: symbol already defined: "OnPlayerSpawn"
It says it's already defined, but it's not. I searched through the defines, and every other file through the server files. Why is this happening?


Re: OnPlayerSpawn already defined - Mohaaaaaaaaaaa - 03.05.2017

it must be defined somewhere


Re: OnPlayerSpawn already defined - aoky - 03.05.2017

Quote:
Originally Posted by Mohaaaaaaaaaaa
Посмотреть сообщение
it must be defined somewhere
It's not trust me I checked. :/


Re: OnPlayerSpawn already defined - Zhao - 03.05.2017

Quote:
Originally Posted by aoky
Посмотреть сообщение
It's not trust me I checked. :/
Check everything again. Look through all the includes as well. It doesn't just give you that error for nothing.

Can you also show us what is at line 974 and a few lines before and after it?


Re: OnPlayerSpawn already defined - FunnyBear - 03.05.2017

Quote:
Originally Posted by aoky
Посмотреть сообщение
Код:
(974) : error 021: symbol already defined: "OnPlayerSpawn"
It says it's already defined, but it's not. I searched through the defines, and every other file through the server files. Why is this happening?
This error message doesn't necessarily mean that OnPlayerSpawn has actually been defined using #define, it just means that you have two of the same callbacks somewhere in your script. Try searching once more through your entire script (using CTRL + F) and you might just find two OnPlayerSpawn callbacks.


Re: OnPlayerSpawn already defined - aoky - 04.05.2017

I checked, I can't seem to find it.


Re: OnPlayerSpawn already defined - DRIFT_HUNTER - 04.05.2017

First of all like FunnyBear said, it doesnt mean it has to be defined as in #define. It's probably public OnPlayerSpawn.

Second it may not be in your gamemode, it could be bad hook (someone forgot to hook it) in some include.

When you are searching use CTRL+F as your eyes could miss it, computer cant.


Re: OnPlayerSpawn already defined - aoky - 04.05.2017

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
First of all like FunnyBear said, it doesnt mean it has to be defined as in #define. It's probably public OnPlayerSpawn.

Second it may not be in your gamemode, it could be bad hook (someone forgot to hook it) in some include.

When you are searching use CTRL+F as your eyes could miss it, computer cant.
I've checked the whole script, defines, I will look through the includes now.