error when compile
#1

this is from a tutorial this code ok.

Код:
public OnGameModeInit()
{
  print("my gamemode");
  ConnectNPC("MyFirstNPC","mynpc");
  return 1;
}
then why i get this errors when i compile??

Код:
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(39) : error 021: symbol already defined: "OnGameModeInit"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
bytheway this is a part of my script where i put that code from that tutorial

Код:
public OnGameModeInit()
{
  print("my gamemode");
  ConnectNPC("MyFirstNPC","mynpc");
  return 1;
}
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Freeroam fun server");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // CJ Skin
	SetGravity(0.008);
	SetWorldTime(2); //Ora globului San Andreas
	SetWeather(11); // Vremea
plz i need help
Reply
#2

Isn't the error obvious? Check your code again - you have two "OnGameModeInit" callbacks, copy the code from the second one and paste it to the first one, and delete the second one (OnGameModeInit-callback).
Reply
#3

so you mean all i have in OneGameModeInit to put in the first public that with NPC?
Reply
#4

I meant this:

pawn Код:
public OnGameModeInit()
{
  SetGameModeText("Freeroam fun server");
  AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // CJ Skin
  SetGravity(0.008);
  SetWorldTime(2); //Ora globului San Andreas
  SetWeather(11); // Vremea
 
  print("my gamemode");
  ConnectNPC("MyFirstNPC","mynpc");
  return 1;
}
Reply
#5

ok thanks don coreli but now i put this code from tutorial

Код:
OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
then now why i get this errors?

Код:
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(36) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(39) : error 017: undefined symbol "SetGameModeText"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(40) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(41) : error 017: undefined symbol "SetGravity"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(42) : error 017: undefined symbol "SetWorldTime"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(43) : error 017: undefined symbol "SetWeather"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(44) : error 017: undefined symbol "UsePlayerPedAnims"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(45) : error 017: undefined symbol "AddStaticPickup"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(46) : error 017: undefined symbol "AddStaticPickup"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(47) : error 017: undefined symbol "AddStaticPickup"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(48) : error 017: undefined symbol "AddStaticPickup"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(49) : error 017: undefined symbol "AddStaticPickup"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(50) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(51) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(52) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(53) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(54) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(55) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(56) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(57) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(58) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(59) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(60) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(61) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(62) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(63) : error 017: undefined symbol "AddPlayerClass"
C:\PROGRA~1\ROCKST~1\SERVER~1.3AR\GAMEMO~1\Sfinx_17.pwn(64) : error 017: undefined symbol "AddPlayerClass"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
this is my script where i put the code from tutorial

Код:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
    OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
help plz


Reply
#6

You have missed a bracket -> }
Reply
#7

you mean this?

OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
"}" < .....
Reply
#8

thats a bracket yes xD
Reply
#9

is allready exist in my code that bracket after "return 1" look,,.....


Код:
OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
	return 1;
}
and after OneGameModeInit allready exist to so what to do to not have those errors?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)