This script not working, help?
#1

Hello. I tryed to make a /updates command, and it shows some text.
Код:
if(strcmp(cmd, "/updates", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        SendClientMessage(playerid, COLOR_GREEN,"Updates of the server.");
		    SendClientMessage(playerid, COLOR_GRAD1,"Verson: v1.0");
			SendClientMessage(playerid, COLOR_GRAD1,"Comming soon.");
			SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
			SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
	  		SendClientMessage(playerid, COLOR_GRAD3,"For olds updates, check your forum");
And i get this:
Код:
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(2550) : error 004: function "FixHour" is not implemented
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(5394) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(5407) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(5639) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(5654) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(5736) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(6000) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(7251) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(7626) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(7639) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(10440) : error 004: function "PBNews" is not implemented
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(10442) : error 004: function "PBUpdateStats" is not implemented
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(10453) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(10655) : error 004: function "PBTele" is not implemented
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(10989) : error 004: function "PBNews" is not implemented
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(10994) : error 004: function "PBNews" is not implemented
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(11801) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(13146) : error 017: undefined symbol "encode_tires"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(13164) : error 017: undefined symbol "encode_tires"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(13197) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(13204) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(13211) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(13218) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(13884) : error 017: undefined symbol "ProxDetector"
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(15688) : error 004: function "FixHour" is not implemented
C:\Users\D\Script\gamemodes\GTA-RGRP.pwn(17099) : error 004: function "FixHour" is not implemented

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


26 Errors.
This is in my gamemode, tryed to put the code in filterscript, no errors, but it wont show up when i do /updates. The log says the filterscript is loaded, but it wont work.

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

if(strcmp(cmd, "/updates", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        SendClientMessage(playerid, COLOR_GREEN,"Updates of the server.");
		    SendClientMessage(playerid, COLOR_GRAD1,"Verson: v1.0");
			SendClientMessage(playerid, COLOR_GRAD1,"Comming soon.");
			SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
			SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
	  		SendClientMessage(playerid, COLOR_GRAD3,"For olds updates, check your forum");
	  		#endif
Filterscript i dont get errors on.
Help?
Reply
#2

lol, what about brackets?
in comamnd you have 2 opened, where are closing?
pawn Код:
if(strcmp(cmd, "/updates", true) == 0)
    {
            SendClientMessage(playerid, COLOR_GREEN,"Updates of the server.");
            SendClientMessage(playerid, COLOR_GRAD1,"Verson: v1.0");
            SendClientMessage(playerid, COLOR_GRAD1,"Comming soon.");
            SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
            SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
            SendClientMessage(playerid, COLOR_GRAD3,"For olds updates, check your forum");
                      return 1;
                   }

            #endif
and why you need IsPalyerConnected?
Reply
#3

Why wouldn't you align that correctly? He'll get Loose Indentation errors

pawn Код:
if(strcmp(cmd, "/updates", true) == 0)
    {
            SendClientMessage(playerid, COLOR_GREEN,"Updates of the server.");
            SendClientMessage(playerid, COLOR_GRAD1,"Verson: v1.0");
            SendClientMessage(playerid, COLOR_GRAD1,"Comming soon.");
            SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
            SendClientMessage(playerid, COLOR_GRAD2,"Comming soon.");
            SendClientMessage(playerid, COLOR_GRAD3,"For olds updates, check the forum");
            return 1;
    }

#endif
Reply
#4

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/updates"true))
    {
        if(
IsPlayerConnected(playerid))
        {
            
SendClientMessage(playeridCOLOR_GREEN"Updates of the server.");
            
SendClientMessage(playeridCOLOR_GRAD1"Verson: v1.0");
            
SendClientMessage(playeridCOLOR_GRAD1"Comming soon.");
            
SendClientMessage(playeridCOLOR_GRAD2"Comming soon.");
            
SendClientMessage(playeridCOLOR_GRAD2"Comming soon.");
            
SendClientMessage(playeridCOLOR_GRAD3"For olds updates, check our forum !");
        }
        return 
1;
    }
    return 
1;

Reply
#5

Quote:
Originally Posted by MoroDan
Посмотреть сообщение
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/updates"true))
    {
        if(
IsPlayerConnected(playerid))
        {
            
SendClientMessage(playeridCOLOR_GREEN"Updates of the server.");
            
SendClientMessage(playeridCOLOR_GRAD1"Verson: v1.0");
            
SendClientMessage(playeridCOLOR_GRAD1"Comming soon.");
            
SendClientMessage(playeridCOLOR_GRAD2"Comming soon.");
            
SendClientMessage(playeridCOLOR_GRAD2"Comming soon.");
            
SendClientMessage(playeridCOLOR_GRAD3"For olds updates, check our forum !");
        }
        return 
1;
    }
    return 
1;

Код:
C:\Users\Alex\Script\filterscripts\updates.pwn(20) : error 017: undefined symbol "COLOR_GREEN"
C:\Users\Alex\Script\filterscripts\updates.pwn(21) : error 017: undefined symbol "COLOR_GRAD1"
C:\Users\Alex\Script\filterscripts\updates.pwn(22) : error 017: undefined symbol "COLOR_GRAD1"
C:\Users\Alex\Script\filterscripts\updates.pwn(23) : error 017: undefined symbol "COLOR_GRAD2"
C:\Users\Alex\Script\filterscripts\updates.pwn(24) : error 017: undefined symbol "COLOR_GRAD2"
C:\Users\Alex\Script\filterscripts\updates.pwn(25) : error 017: undefined symbol "COLOR_GRAD3"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Now is it something i need to define, dont rember what.
Reply
#6

pawn Код:
#define COLOR_GREEN 0x003300AA
^^like that, the GRAD's look like how dark your text gets the farther away you go away from a player when you are speaking in IC chat.
Reply
#7

pawn Код:
put this on top of you script:(below #include <a_samp>)
#define COLOR_GREEN 0xFFFFFFAA
#define COLOR_GRAD1 0xFFFFFFAA
#define COLOR_GRAD2 0xFFFFFFAA
#define COLOR_GRAD3 0xFFFFFFAA
Reply
#8

Thanks all. Worked. Sloved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)