SA-MP Forums Archive
Scripting Errors - 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: Scripting Errors (/showthread.php?tid=468152)



Scripting Errors - IPlayGames000 - 06.10.2013

Now what is happening is when I join the game I register blah blah blah, but it doesn't give me a team.


Re: Scripting Errors - EiresJason - 06.10.2013

AddPlayerClass goes under OnGameModeInit(), make sure it's under it.

pawn Код:
public OnGameModeInit()
{
     AddPlayerClass(code..);
     return 1;
}
As for 'argument type mismatch', post lines 176 and 186.


Re: Scripting Errors - IPlayGames000 - 06.10.2013

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
AddPlayerClass goes under OnGameModeInit(), make sure it's under it.

pawn Код:
public OnGameModeInit()
{
     AddPlayerClass(code..);
     return 1;
}
As for 'argument type mismatch', post lines 176 and 186.
Had fixed the mismatch, but still getting the same errors?

Код:
C:\Users\Rachel\Desktop\script\gamemodes\OmegaArmy.pwn(193) : error 021: symbol already defined: "AddPlayerClass"
C:\Users\Rachel\Desktop\script\gamemodes\OmegaArmy.pwn(195) : error 021: symbol already defined: "AddPlayerClass"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Scripting Errors - EiresJason - 06.10.2013

You must have
pawn Код:
AddPlayerClass(283,1525.3658,-1677.8137,5.8906,98.1724,0,0,0,0,0,0);
outside of a function/callback.


Re: Scripting Errors - gotwarzone - 06.10.2013

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
AddPlayerClass goes under OnGameModeInit(), make sure it's under it.

pawn Код:
public OnGameModeInit()
{
     AddPlayerClass(code..);
     return 1;
}
As for 'argument type mismatch', post lines 176 and 186.
Also please show the warning lines...

Try to remove those 2. And yes maybe some addplayerclasss is somewhere in your script


Re: Scripting Errors - IPlayGames000 - 06.10.2013

Quote:
Originally Posted by gotwarzone
Посмотреть сообщение
Also please show the warning lines...

Try to remove those 2. And yes maybe some addplayerclasss is somewhere in your script
Nevermind, I figured it out, I had must have left the coding down there somehow, and it stayed there LOL, anyways, thanks for the help


Re: Scripting Errors - EiresJason - 06.10.2013

Hehe np