[GM]Please take a look getting few errors :(
#1

hello all

i am making gm and decided to transfer my old teleports to it...
i am getting few errors maybe someone know how to fix them?
Quote:

#include <a_samp>
#include <Seifader>

forward SendAllFormattedText(playerid, const str[], define);
forward SendPlayerFormattedText(playerid, const str[], define);
forward GetDistanceBetweenPlayers(playerid,playerid2);
forward RemoveREG(playerid);
//Colors
#define COLOR_BASIC 0x0066FFAA
#define COLOR_RED 0xCC0000AA
#define COLOR_GREY 0xAFAFAFAA
#define SendAllFormattedText
#define playerid

main()
{
print("UD Gamemode");
print("BY AudiFan");
print(" Loading gm.....");
print(" Loaded successful.");
print(" Loaded 1 gamemode.");
}

public OnGameModeInit()
{

forward SendAllFormattedText(playerid, const str[], define);
forward SendPlayerFormattedText(playerid, const str[], define);
forward GetDistanceBetweenPlayers(playerid,playerid2);
SetGameModeText("Update V4.0");
UsePlayerPedAnims();


//player classes---------------------------------------------------------------

AddPlayerClass(180,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(217,-468.3654,2208.0317,46.4776,115.0000,4,1,1,1,0,0);
AddPlayerClass(211,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 28,-468.3654,2208.0317,46.4776,115.0000,4,1,1,1,0,0);
AddPlayerClass( 0,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(202,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(137,-467.6280,2208.3828,46.4052,115.0000,0,0,0,0,0,0);
AddPlayerClass( 21,-468.3654,2208.0317,46.4776,115.0000,4,1,1,1,0,0);
AddPlayerClass( 22,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass( 19,-467.6280,2208.3828,46.4052,115.0000,4,1,1,1,0,0);
AddPlayerClass(181,-468.3654,2208.0317,46.4776,115.0000,4,1,41,50,0,0) ;
AddPlayerClass(242,-469.4590,2207.5110,46.5850,115.0000,4,1,2,1,0,0);
AddPlayerClass( 29,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass( 61,-467.6280,2208.3828,46.4052,115.0000,0,0,0,0,0,0);
AddPlayerClass(167,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(179,-469.4590,2207.5110,46.5850,115.0000,4,1,6,1,0,0);
AddPlayerClass(204,-470.4734,2207.0278,46.6846,115.0000,4,1,8,1,0,0);
AddPlayerClass( 80,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 81,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 23,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 99,-469.4590,2207.5110,46.5850,115.0000,0,0,0,0,0,0);
AddPlayerClass(161,-470.4734,2207.0278,46.6846,115.0000,6,1,0,0,0,0);
AddPlayerClass( 33,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(163,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(164,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(165,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(166,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(277,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(280,-467.6280,2208.3828,46.4052,115.0000,4,1,3,1,0,0);
AddPlayerClass(282,-468.3654,2208.0317,46.4776,115.0000,4,1,3,1,0,0);
AddPlayerClass(283,-469.4590,2207.5110,46.5850,115.0000,4,1,3,1,0,0);
AddPlayerClass(284,-470.4734,2207.0278,46.6846,115.0000,4,1,3,1,0,0);
AddPlayerClass(285,-467.6280,2208.3828,46.4052,115.0000,4,1,3,1,0,0);
AddPlayerClass(287,-468.3654,2208.0317,46.4776,115.0000,4,1,3,1,0,0);
AddPlayerClass(100,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(106,-470.4734,2207.0278,46.6846,115.0000,4,1,1,1,0,0);
AddPlayerClass( 93,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(233,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 41,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(178,-470.4734,2207.0278,46.6846,115.0000,4,1,11,1,0,0);
AddPlayerClass(246,-467.6280,2208.3828,46.4052,115.0000,4,1,11,1,0,0);
AddPlayerClass( 85,-469.4590,2207.5110,46.5850,115.0000,4,1,11,1,0,0);
AddPlayerClass(192,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(193,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(286,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 18,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 26,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(141,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(189,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 70,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(213,-467.6280,2208.3828,46.4052,115.0000,4,1,1,1,0,0);
AddPlayerClass(206,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(228,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(240,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(272,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(269,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);

////////ALL GO HERE!!!!!!/////////////////////////////////////////////////////////////////////////////////////////////////////////////





public SendAllFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}



//stuff should go here!!!!!!!!

//-----------Drift


if(strcmp(cmdtext, "/drift13", true) == 0)
{

SetPlayerInterior(playerid,0);
{if(State!=PLAYER_STATE_DRIVER)
{SetPlayerPos(playerid,1063.4424,1746.3445,10.6122 );}
else if(IsPlayerInVehicle(playerid, cartype) == 1)
{SetVehiclePos(cartype,1063.4424,1746.3445,10.6122 );
SetVehicleZAngle(cartype,304.2583);}
else
{SetPlayerPos(playerid,1063.4424,1746.3445,10.6122 );}
GameTextForPlayer(playerid,"Welcome to dirft 1",2500,3);}
return 1;}




return 1;
}

public OnPlayerScreenFade(playerid, color, speed)
{
return 1;
}


public OnPlayerScreenColorFade(playerid, color, speed)
{
return 1;
}

whats the problem?

thank you for your time and help
Reply
#2

what are the errors and lines
________
LovelyWendie99
Reply
#3

wats the error? :P
Reply
#4

Код:
if(strcmp(cmdtext, "/drift13", true) == 0)
{
SendClientMessage(playerid, color, "Welcome to Drift 1");
SetPlayerInterior(playerid,0);
if(IsPlayerInVehicle(playerid, cartype) == 1) {
SetVehiclePos(cartype,1063.4424,1746.3445,10.6122);
SetVehicleZAngle(cartype,304.2583);
}
else
{
SetPlayerPos(playerid,1063.4424,1746.3445,10.6122);
return 1;
}
________
EXPERT INSURANCE
Reply
#5

1."OnGameModeInit" Callback does not have a closing bracket.
2. Some of the " forwarded " functions are missing in the gm.
3. Commands Should be put under the callback " OnPlayerCommandText "
Reply
#6

sorry guys i am a little new to scripting,

could you show me example?

like if i want to make this teleport work what should i do and where? thanks

if(strcmp(cmdtext, "/drift13", true) == 0)
{
SendClientMessage(playerid, color, "Welcome to Drift 1");
SetPlayerInterior(playerid,0);
if(IsPlayerInVehicle(playerid, cartype) == 1) {
SetVehiclePos(cartype,1063.4424,1746.3445,10.6122) ;
SetVehicleZAngle(cartype,304.2583);
}
else
{
SetPlayerPos(playerid,1063.4424,1746.3445,10.6122) ;
return 1;
}
Reply
#7

Under the last addplayerclass
return 1;
}

then add the command /drift13

under onplayercommandtext
________
Avandia Lawsuit Information
Reply
#8

ok i did now i get this:

Quote:

C:\Users\AudiFan\Desktop\New folder\pawno\include\Seifader.inc(9 : error 004: function "OnPlayerScreenFade" is not implemented
C:\Users\AudiFan\Desktop\New folder\pawno\include\Seifader.inc(114) : error 004: function "OnPlayerScreenColorFade" is not implemented
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(101) : error 017: undefined symbol "color"
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(103) : error 017: undefined symbol "cartype"
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(104) : error 017: undefined symbol "cartype"
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(105) : error 017: undefined symbol "cartype"
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(114) : warning 217: loose indentation
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(114) : error 029: invalid expression, assumed zero
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(114) : error 004: function "OnPlayerScreenFade" is not implemented
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(120) : warning 225: unreachable code
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(120) : error 029: invalid expression, assumed zero
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(120) : error 004: function "OnPlayerScreenColorFade" is not implemented
C:\Users\AudiFan\Desktop\New folder\gamemodes\stunting.pwn(125) : error 030: compound statement not closed at the end of file (started at line 101)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


11 Errors.

when i compile this:

Quote:

#include <a_samp>
#include <Seifader>


//Colors
#define COLOR_BASIC 0x0066FFAA
#define COLOR_RED 0xCC0000AA
#define COLOR_GREY 0xAFAFAFAA

main()
{
print("UD Gamemode");
print("BY AudiFan");
print(" Loading gm.....");
print(" Loaded successful.");
print(" Loaded 1 gamemode.");
}

public OnGameModeInit()
{
SetGameModeText("Update V4.0");
UsePlayerPedAnims();



//player classes---------------------------------------------------------------

AddPlayerClass(180,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(217,-468.3654,2208.0317,46.4776,115.0000,4,1,1,1,0,0);
AddPlayerClass(211,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 28,-468.3654,2208.0317,46.4776,115.0000,4,1,1,1,0,0);
AddPlayerClass( 0,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(202,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(137,-467.6280,2208.3828,46.4052,115.0000,0,0,0,0,0,0);
AddPlayerClass( 21,-468.3654,2208.0317,46.4776,115.0000,4,1,1,1,0,0);
AddPlayerClass( 22,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass( 19,-467.6280,2208.3828,46.4052,115.0000,4,1,1,1,0,0);
AddPlayerClass(181,-468.3654,2208.0317,46.4776,115.0000,4,1,41,50,0,0) ;
AddPlayerClass(242,-469.4590,2207.5110,46.5850,115.0000,4,1,2,1,0,0);
AddPlayerClass( 29,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass( 61,-467.6280,2208.3828,46.4052,115.0000,0,0,0,0,0,0);
AddPlayerClass(167,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(179,-469.4590,2207.5110,46.5850,115.0000,4,1,6,1,0,0);
AddPlayerClass(204,-470.4734,2207.0278,46.6846,115.0000,4,1,8,1,0,0);
AddPlayerClass( 80,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 81,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 23,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 99,-469.4590,2207.5110,46.5850,115.0000,0,0,0,0,0,0);
AddPlayerClass(161,-470.4734,2207.0278,46.6846,115.0000,6,1,0,0,0,0);
AddPlayerClass( 33,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(163,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(164,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(165,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(166,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(277,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(280,-467.6280,2208.3828,46.4052,115.0000,4,1,3,1,0,0);
AddPlayerClass(282,-468.3654,2208.0317,46.4776,115.0000,4,1,3,1,0,0);
AddPlayerClass(283,-469.4590,2207.5110,46.5850,115.0000,4,1,3,1,0,0);
AddPlayerClass(284,-470.4734,2207.0278,46.6846,115.0000,4,1,3,1,0,0);
AddPlayerClass(285,-467.6280,2208.3828,46.4052,115.0000,4,1,3,1,0,0);
AddPlayerClass(287,-468.3654,2208.0317,46.4776,115.0000,4,1,3,1,0,0);
AddPlayerClass(100,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(106,-470.4734,2207.0278,46.6846,115.0000,4,1,1,1,0,0);
AddPlayerClass( 93,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(233,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 41,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(178,-470.4734,2207.0278,46.6846,115.0000,4,1,11,1,0,0);
AddPlayerClass(246,-467.6280,2208.3828,46.4052,115.0000,4,1,11,1,0,0);
AddPlayerClass( 85,-469.4590,2207.5110,46.5850,115.0000,4,1,11,1,0,0);
AddPlayerClass(192,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(193,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(286,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass( 18,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 26,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(141,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(189,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass( 70,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(213,-467.6280,2208.3828,46.4052,115.0000,4,1,1,1,0,0);
AddPlayerClass(206,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
AddPlayerClass(228,-469.4590,2207.5110,46.5850,115.0000,4,1,0,0,0,0);
AddPlayerClass(240,-470.4734,2207.0278,46.6846,115.0000,4,1,0,0,0,0);
AddPlayerClass(272,-467.6280,2208.3828,46.4052,115.0000,4,1,0,0,0,0);
AddPlayerClass(269,-468.3654,2208.0317,46.4776,115.0000,4,1,0,0,0,0);
return 1;
}

////////ALL GO HERE!!!!!!/////////////////////////////////////////////////////////////////////////////////////////////////////////////






//stuff should go here!!!!!!!!

//-----------Drift
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/drift13", true) == 0)
{
SendClientMessage(playerid, color, "Welcome to Drift 1");
SetPlayerInterior(playerid,0);
if(IsPlayerInVehicle(playerid, cartype) == 1) {
SetVehiclePos(cartype,1063.4424,1746.3445,10.6122) ;
SetVehicleZAngle(cartype,304.2583);
}
else
{
SetPlayerPos(playerid,1063.4424,1746.3445,10.6122) ;
return 1;
}


public OnPlayerScreenFade(playerid, color, speed)
{
return 1;
}


public OnPlayerScreenColorFade(playerid, color, speed)
{
return 1;
}

btw thank you for your help and pations with my "noob" questions lol
Reply
#9

1.Pawno is not case sensitive... so if in defining such as " COLOR_BASIC" you used caps, when you need to use that variable you need to type it exactly as it is... so: "COLOR_BASIC" and not "color-basic".

2. These callbacks i think you need some fs, of Seif, but i forgot its name exactly. Since they are empty you can just delete them... it won't do any effects... i'm refering to this:
Код:
public OnPlayerScreenFade(playerid, color, speed)
{
  return 1;
}


public OnPlayerScreenColorFade(playerid, color, speed)
{
  return 1;
}
Reply
#10

the thing is once i remove my teleport and defenitions of it my gm compile no problem :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)