Get a variable's tag...
#3

Quote:
Originally Posted by eblood1
Посмотреть сообщение
I don't think you can. Why would you need it, anyway?
Originally, I had a piece of code that basically goes through an enum and clears each piece of data, but some of the data has a "Timer:" tag that corresponds with the timers I have using y_timers. I wanted to make sure I could go through the enum in a loop and search to see if the tag equaled "Timer:" and if it did, it would just use the "stop" function y_timers has.

Nevertheless, I have found a solution around that. I'm still interested to see if this is even possible, though.

EDIT: Thanks ******, I'll check it out.

EDIT 2: Okay, this piece of code crashes the compiler... I tried it with a Float: tag, but that didn't work either...

pawn Код:
new
    Timer:tempTimerVar;
   
for(new i = 0; enumPlayerInfo:i < enumPlayerInfo; i++)
{
    if(tagof(enumPlayerInfo:i) == tagof(tempTimerVar))
    {
        stop pStats[playerid][enumPlayerInfo:i];
        continue;
    }
       
    pStats[playerid][enumPlayerInfo:i] = 0;
}
Reply


Messages In This Thread
Get a variable's tag... - by Scenario - 05.06.2013, 23:41
Re: Get a variable's tag... - by eblood1 - 05.06.2013, 23:46
Re: Get a variable's tag... - by Scenario - 05.06.2013, 23:49
Re: Get a variable's tag... - by Scenario - 06.06.2013, 00:07

Forum Jump:


Users browsing this thread: 2 Guest(s)