remove minus (-)
#1

pawn Код:
main()
{
    printf("result: %s", NoMinus("some-string-with-minus"));
}

stock NoMinus(string[])
{
    for(new i; i < strlen(string); i++)
    {
        if(string[i] == '-')
        {
            strdel(string, i, i+1);
        }
    }
    return string;
}
this return >>Script[gamemodes/gamemode.amx]: Run time error 5: "Invalid memory access"<<
but it should return >>result: somestringwithminus<<
Reply


Messages In This Thread
remove minus (-) - by Unknown123 - 01.10.2011, 12:07
Re: remove minus (-) - by wups - 01.10.2011, 12:15
Re: remove minus (-) - by FireCat - 01.10.2011, 12:17
Re: remove minus (-) - by Unknown123 - 01.10.2011, 12:18
Re: remove minus (-) - by FireCat - 01.10.2011, 12:21
Re: remove minus (-) - by wups - 01.10.2011, 12:23
Re: remove minus (-) - by Unknown123 - 01.10.2011, 12:23
Re: remove minus (-) - by wups - 01.10.2011, 12:27
Re: remove minus (-) - by KoczkaHUN - 03.10.2011, 18:34
Re: remove minus (-) - by AndreT - 03.10.2011, 18:52

Forum Jump:


Users browsing this thread: 1 Guest(s)