SA-MP Forums Archive
Two Erroros Undefine Symbol - 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)
+--- Thread: Two Erroros Undefine Symbol (/showthread.php?tid=308602)



Two Erroros Undefine Symbol - Spooky - 04.01.2012

pawn Код:
CMD:count(playerid, params[])
{
    TextDrawShowForPlayer(playerid, text);
    CountDown(text, playerid, 5);
    return 1;
}
forward CountDown(Text: text, playerid, time);
public CountDown(Text: text, playerid, time) {
    if(time < 1) {
        TextDrawSetString(text, "~r~GoGo!");
        SetTimerEx("tTextDrawHide", 5000, false, "ii", playerid, _: text);
    } else {
        new
            str[8] = "~r~";
        valstr(str[3], time, false);
        TextDrawSetString(text, str);
        SetTimerEx("CountDown", 1000, false, "iii", _: text, playerid, --time);
    }
}
forward tTextDrawHide(playerid, Text: text);
public tTextDrawHide(playerid, Text: text) {
    if(playerid == MAX_PLAYERS) {
        TextDrawHideForAll(text);
    } else {
        TextDrawHideForPlayer(playerid, text);
    }
}

ERRORS
[code]
E:\SA-MP\SA-MP SERVERS\My Projects\0.3d\DM,STUNT,RACE\Live Stunting(ENG) E:\SA-MP\SA-MP SERVERS\My Projects\0.3d\DM,STUNT,RACE\Live Stunting(ENG) [DM,STUNT,RACE,DERBY]\Server\gamemodes\1.0.pwn(1917) : warning 213: tag mismatch
E:\SA-MP\SA-MP SERVERS\My Projects\0.3d\DM,STUNT,RACE\Live Stunting(ENG) [DM,STUNT,RACE,DERBY]\Server\gamemodes\1.0.pwn(191 : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.


PLease Hlp


Re: Two Erroros Undefine Symbol - #Pwn. - 04.01.2012

Have you got:

Код:
new Textdraw:text



Re: Two Erroros Undefine Symbol - Spooky - 04.01.2012

Now i changed the code and added that

pawn Код:
new Textdraw:MyTd;

CMD:count(playerid, params[])
{
    TextDrawShowForPlayer(playerid, MyTd);
    CountDown(MyTd, playerid, 5);
    return 1;
}
forward CountDown(Text: text, playerid, time);
public CountDown(Text: text, playerid, time) {
    if(time < 1) {
        TextDrawSetString(text, "~r~GoGo!");
        SetTimerEx("tTextDrawHide", 5000, false, "ii", playerid, _: text);
    } else {
        new
            str[8] = "~r~";
        valstr(str[3], time, false);
        TextDrawSetString(text, str);
        SetTimerEx("CountDown", 1000, false, "iii", _: text, playerid, --time);
    }
}
forward tTextDrawHide(playerid, Text: text);
public tTextDrawHide(playerid, Text: text) {
    if(playerid == MAX_PLAYERS) {
        TextDrawHideForAll(text);
    } else {
        TextDrawHideForPlayer(playerid, text);
    }
}
Still its giving warnings
Код:
E:\SA-MP\SA-MP SERVERS\My Projects\0.3d\DM,STUNT,RACE\Live Stunting(ENG) [DM,STUNT,RACE,DERBY]\Server\gamemodes\1.0.pwn(1917) : warning 213: tag mismatch
E:\SA-MP\SA-MP SERVERS\My Projects\0.3d\DM,STUNT,RACE\Live Stunting(ENG) [DM,STUNT,RACE,DERBY]\Server\gamemodes\1.0.pwn(1918) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.



Re: Two Erroros Undefine Symbol - Spooky - 04.01.2012

I am a Noob lol
its not working the textdraw is not showing in the game
and i want like this
it should show a textdraw
HOURS:MINUTES:SECONDS

like this it should show

pawn Код:
CMD:count(playerid, params[])
{
    new minutes, seconds, hours;
    if(!sscanf(params,"iii", seconds, minutes, hours))
    {
        TextDrawShowForPlayer(playerid, MyTd);
        CountDown(MyTd, playerid, time);
    }
    else SendClientMessage(playerid, ERROR,"Usage: /count [seconds][minutes][hours]");
    return 1;
}
forward CountDown(Text: text, playerid, time);
public CountDown(Text: text, playerid, time) {
    if(time < 1) {
        TextDrawSetString(text, "~r~GoGo!");
        SetTimerEx("tTextDrawHide", 5000, false, "ii", playerid, _: text);
    } else {
        new
            str[8] = "~r~";
        valstr(str[3], time, false);
        TextDrawSetString(text, str);
        SetTimerEx("CountDown", 1000, false, "iii", _: text, playerid, --time);
    }
}
forward tTextDrawHide(playerid, Text: text);
public tTextDrawHide(playerid, Text: text) {
    if(playerid == MAX_PLAYERS) {
        TextDrawHideForAll(text);
    } else {
        TextDrawHideForPlayer(playerid, text);
    }
}



Re: Two Erroros Undefine Symbol - Spooky - 04.01.2012

Please help me scripting that thing.


Re: Two Erroros Undefine Symbol - Spooky - 04.01.2012

PLease HElp *BUMP*


Re: Two Erroros Undefine Symbol - Stigg - 04.01.2012

This:
pawn Код:
new Textdraw:MyTd;
Should be:
pawn Код:
new Text:MyTd;
See if that helps any.


Re: Two Erroros Undefine Symbol - Spooky - 04.01.2012

its not working the textdraw is not showing in the game
and i want like this
it should show a textdraw
HOURS:MINUTES:SECONDS

like this it should show

pawn Код:
CMD:count(playerid, params[])
{
    new minutes, seconds, hours;
    if(!sscanf(params,"iii", seconds, minutes, hours))
    {
        TextDrawShowForPlayer(playerid, MyTd);
        CountDown(MyTd, playerid, time);
    }
    else SendClientMessage(playerid, ERROR,"Usage: /count [seconds][minutes][hours]");
    return 1;
}
forward CountDown(Text: text, playerid, time);
public CountDown(Text: text, playerid, time) {
    if(time < 1) {
        TextDrawSetString(text, "~r~GoGo!");
        SetTimerEx("tTextDrawHide", 5000, false, "ii", playerid, _: text);
    } else {
        new
            str[8] = "~r~";
        valstr(str[3], time, false);
        TextDrawSetString(text, str);
        SetTimerEx("CountDown", 1000, false, "iii", _: text, playerid, --time);
    }
}
forward tTextDrawHide(playerid, Text: text);
public tTextDrawHide(playerid, Text: text) {
    if(playerid == MAX_PLAYERS) {
        TextDrawHideForAll(text);
    } else {
        TextDrawHideForPlayer(playerid, text);
    }
}