SA-MP Forums Archive
what the wrong with this fs - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: what the wrong with this fs (/showthread.php?tid=247550)



what the wrong with this fs - misho1 - 09.04.2011

when i compile rm fs i get
Код:
F:\Fun and Games server\filterscripts\rm1.pwn(36) : error 029: invalid expression, assumed zero
F:\Fun and Games server\filterscripts\rm1.pwn(36) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
the fs code
pawn Код:
#include <a_samp>

new Text:ShadowsRandom;
forward RandomMessage();
public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print("       RandomMessages by Shadow");
        print("--------------------------------------\n");

        SetTimer("RandomMessage",3000,1);

        ShadowsRandom = TextDrawCreate(18.000000,428.000000,"We are apart of Emerald-Gaming!");
        TextDrawAlignment(ShadowsRandom,0);
        TextDrawBackgroundColor(ShadowsRandom,0x000000ff);
        TextDrawFont(ShadowsRandom,2);
        TextDrawLetterSize(ShadowsRandom,0.199999,0.899999);
        TextDrawColor(ShadowsRandom,0xffffffff);
        TextDrawSetOutline(ShadowsRandom,1);
        TextDrawSetProportional(ShadowsRandom,1);
        TextDrawSetShadow(ShadowsRandom,1);
        return 1;

}

new RandomMessages[][] =
{
    "Have you seen a hacker/cheater? use /report [ID] [Reason]",
    "If You Disobey The Rules You Will Get Ban To Read The Rules Type /Rules",
    "Join To The Server's Forum funandgamesserver.freeforums.org",
    "This Server For Fun and Every Thing That You Wan't Will Come!!",
    "If You Need Help Type /cmds and /help",
    "Have Idea Tell IT ine uour forum funandgamesserver.freeforum.org",

};

public RandomMessage()
{
        TextDrawSetString(ShadowsRandom, RandomMessages[random(sizeof(RandomMessages))]);
        return 1;
}

public OnPlayerSpawn(playerid)
{
        TextDrawShowForPlayer(playerid, ShadowsRandom);
        return 1;
}
what the wrong plz help


Re: what the wrong with this fs - misho1 - 09.04.2011

help


Re: what the wrong with this fs - Mean - 09.04.2011

What's the line 36, and use [ pawn ] [ /pawn ] because [ code ] is hard to read with no SYNTAX highlighting.


Re: what the wrong with this fs - misho1 - 09.04.2011

i changed it to pawn


Re: what the wrong with this fs - xir - 09.04.2011

Try this

pawn Код:
new RandomMessages[][] =
{
    "Have you seen a hacker/cheater? use /report [ID] [Reason]",
    "If You Disobey The Rules You Will Get Ban To Read The Rules Type /Rules",
    "Join To The Server's Forum funandgamesserver.freeforums.org",
    "This Server For Fun and Every Thing That You Wan't Will Come!!",
    "If You Need Help Type /cmds and /help",
    "Have Idea Tell IT ine uour forum funandgamesserver.freeforum.org"

};



Re: what the wrong with this fs - misho1 - 09.04.2011

thnx