Jump to content
  • 0

eroare script fast-event


Dynamic

Question

imi da eroare la compilare dupa ce am adaugat scriptul fast-event in gm

Errori:

C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(2882) : error 021: symbol already defined: "main"
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(13456) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58526) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : error 017: undefined symbol "xReactionProgress"
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : fatal error 107: too many error messages on one line

Fsu:

[pawn]#include <a_samp>

#if !defined Loop

#define Loop(%0,%1) \

for(new %0 = 0; %0 != %1; %0++)

#endif

#if !defined function

#define function%0(%1) \

forward%0(%1); public%0(%1)

#endif

#if !defined PURPLE

#define PURPLE \

    0xBF60FFFF

#endif

#if !defined GREEN

#define GREEN \

    0x94D317FF

#endif

#if !defined TIME

#define TIME \

    180000

#endif

new

xCharacters[][] =

{

    "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",

"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",

    "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",

"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",

    "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"

},

xChars[16] = "",

ReactionTime,

xCash,

xScore,

bool: xTestBusy

;

main()

{

}

public OnFilterScriptInit()

{

ReactionTime = SetTimer("ReactionTest", TIME, 1);

return 1;

}// aici 1 eroare la linia 13456

public OnFilterScriptExit()

{

KillTimer(ReactionTime);

return 1;

}

public OnPlayerText(playerid, text[])

{

switch(xTestBusy)// aici a 2 a eroare la linia [58526]

{

    case true:

    {

if(!strcmp(xChars, text, false))

{

    new

        string[128],

        pName[MAX_PLAYER_NAME]

;

GetPlayerName(playerid, pName, sizeof(pName));

format(string, sizeof(string), "-= \%s\" a castigat testul de reactie. -=", pName);

    SendClientMessageToAll(GREEN, string);

    format(string, sizeof(string), "-= Ai incasat $%d + %d score. -=", xCash, xScore);

    SendClientMessage(playerid, GREEN, string);

    GivePlayerMoney(playerid, xCash);

SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);

ReactionTime = SetTimer("ReactionTest", TIME, 1);

    xTestBusy = false;

}

}

}

return 1;

}

function xReactionProgress() // aici eroarea 3,4,5 la linia [58544]

{

    switch(xTestBusy)

{

    case true:

    {

    new

        string[128]

;

format(string, sizeof(string), "{6EF83C}-= {FFFFFF}Nimeni nu a castigat testul de reactie. Va reincepe altul in %d minutes. {6EF83C}-=", (TIME/60000));

    SendClientMessageToAll(PURPLE, string);

        ReactionTime = SetTimer("ReactionTest", TIME, 1);

        }

}

return 1;

}

function ReactionTest()

{

new

xLength = (random(8) + 2),

string[128]

;

xCash = (random(10000) + 20000);

xScore = (random(2)+1);

format(xChars, sizeof(xChars), "");

Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);

format(string, sizeof(string), "{6EF83C}-= {FFFFFF}Cine scrie primul %s va castiga $%d + %d si score points. {6EF83C}-=", xChars, xCash, xScore);

SendClientMessageToAll(PURPLE, string);

KillTimer(ReactionTime);

xTestBusy = true;

SetTimer("xReactionProgress", 30000, 0);

return 1;

}[/pawn]

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Scriptul nu are nimic, e perfect functional doar ca nu l-ai adaugat tu bine.Ca sa incorporezi un filterscript cu modul tau de joc, trebuie sa pui codul corect si nu sa dai "copy + paste" oriunde in gamemode.Din erori imi dau seama ca tu doar ai copiat codul si l-ai adaugat in modul de joc la intamplare.

P.S: Tu vrei sa adaugi un "reaction test" pe un mod Godfather?

Link to comment
Share on other sites

nu chiar l-am copiat am mai modific unele locuri dar nu toate m-ai putea ajuta te rog?:|

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(2882) : error 021: symbol already defined: "main"
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(13456) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58526) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : warning 225: unreachable code
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : error 017: undefined symbol "xReactionProgress"
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58544) : fatal error 107: too many error messages on one line

[list type=decimal]

[*]Prima eroare spune ca simbolul "main" se mai afla inca odata in gamemode.

[*]Al 2-lea avertizment iti spune ca, codul nu este bun.

[*]Al 3-ea avertizment iti spune ca variabila string se mai afla inca odata in acel callback.

[*]____,,_____ (aceiasi chestie ca la al 2-lea pas).

[*]____,,_____ (expresia asumata nu corespunde).

[*]A 6-ea eroare iti spune ca xReactionProgress nu este definit, iar tu trebuie sa il definesti:

function xReactionProgress ( )

{

  switch ( xTestBusy )

   

{

    case true :

   

    {

   

    new

   

        string [  128  ]

       

  ;

  format ( string , sizeof ( string ) , "Darky - %d" , ( TIME / 60000 ) ) ;

    SendClientMessageToAll ( PURPLE , string ) ;

   

        ReactionTime = SetTimer ( "ReactionTest" , TIME , 1 ) ;

       

        }

       

}

return ( 1 ) ;

}

Link to comment
Share on other sites

tot nu reusesc modifica tu te rog scriptu te rog frumos

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

El ti-a explicat cum sa faci, tu vrei mura-n gura?, pune-ti mintea la contributie si fa ce ti-a zis el!

am incercat ma da nu reusesc imi da mai multe erori 26:|

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

}
dcmd_rset(playerid,params[])
{
	if(!IsPlayerAdmin(playerid))return 0;
	new text[128], cash;
	if(sscanf(params,"si",text,cash))return SendClientMessage(playerid,COLOR_WHITE,"Folosinta: /rset [word] [money]");
	if(strlen(text) > 25) return SendClientMessage(playerid,COLOR_GRAD2,"ERROR: Your fastevent word is to long. Please shorten it to 25 characters max.");
	if(cash < 1 || cash > 1000000000) return SendClientMessage(playerid,COLOR_GRAD2,"ERROR: Invalid prize money. Please use $1 - $1000000000.");
	SendClientMessage(playerid,0x00FF80FF,"You have put an FastEvent.");
	format(ReactionString,sizeof(ReactionString),"%s",text);
	ReactionCash = cash;
	PassiveMode = PASSIVE_ON;
	ReactionTest();
	return 1;
}
public ReactionTest()
{
	KillTimer(ReactionTimer);
	new string[80];
	if(PassiveMode == PASSIVE_OFF)
	{
		new Rstr[] = "aAbBcCdDeEfFgGhHIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789";//Characters that will appear in the reaction test. Small "i" removed as it looks the same as a capital "i" in game.
		for (new i = 0; i < 9; i++)ReactionString[i] = Rstr[random(sizeof(Rstr))];
		ReactionCash = random( MAX_WINNINGS - MIN_WINNINGS ) + MIN_WINNINGS;
	}
	else PassiveMode = PASSIVE_OFF;
	ReactionState = R_STATE_ACTIVE;
	format(string,sizeof(string),"The first person who type %s will won $%d!",ReactionString,ReactionCash);
	SendClientMessageToAll(0x00A400FF,string);
	ReactionTimer = SetTimer("ReactionTest",REACTION_TIME*1000*60,true);
	return 1;
}
Asta il folosest eu, acuma tu daca vrei, folosestel! * Integrat in gamemode, fara niciun FS! --
if(cash < 1 || cash > 1000000000)
Cati bani vrei tu sa dea, iti editezi tu acolo.
if(strlen(text) > 25)
Cate caractere sa aibe cuvantu "Maxim".
ReactionTimer = SetTimer("ReactionTest",REACTION_TIME*1000*60,true);

Timpul la "Fast-Event"

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.