Raised This Month: $12 Target: $400
 3% 

while i++ == containi[i] problem, i need to skip letters ( fixed)


Post New Thread Reply   
 
Thread Tools Display Modes
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-10-2009 , 10:06   Re: while i++ == containi[i] problem, i need to skip letters
Reply With Quote #21

what hardcoded? O_o

Quote:
if you want it to work with more than one exclamation mark similar to the @ symbols
already did this, this is easy, but change to skip specifix prefix checking from three letters and count symbols after it is what i want to acheive without luck atm =\
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-10-2009 , 10:08   Re: while i++ == containi[i] problem, i need to skip letters
Reply With Quote #22

PHP Code:
    if (!|| 3)
    {
        return 
PLUGIN_CONTINUE
    

PHP Code:
    set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos06.06.00.50.15, -1
__________________
fysiks is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-10-2009 , 10:21   Re: while i++ == containi[i] problem, i need to skip letters
Reply With Quote #23

i is the number of @ to detect hud position we should only use it for it's purpose, and to set a hud right we first should make a hud appear =\


my most recent test
PHP Code:
new said[6], 000
    read_argv
(1said5)

if(
said[k] == '>')
    {
        
k++
        
j++
        
log_amx("> ! conditon 1 met")
    } 
    
    if(
said[k] == ' ' && != 0)
    {
        
k++
        
j++
        
log_amx("> ! conditon 2 met")
    } 
    
    
    while (
said[k] == '!')
    {
        
i++
    } 
condition 2 is never met
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 04-10-2009 at 10:29.
Owyn is offline
Send a message via ICQ to Owyn
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-10-2009 , 10:26   Re: while i++ == containi[i] problem, i need to skip letters
Reply With Quote #24

Quote:
Originally Posted by .Owyn. View Post
i is the number of @ to detect hud position we should only use it for it's purpose, and to set a hud right we first should make a hud appear =\
i is the position in the string (the number of @ symbols -1) so, that indexes the position array correctly. But when you make "> " in front of that then you are going to be out of bounds with the position array because i can be greater than 3 in your case.
__________________
fysiks is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-10-2009 , 10:39   Re: while i++ == containi[i] problem, i need to skip letters
Reply With Quote #25

i just change all i to i + k for that

why none of my code works? lol
PHP Code:
if ( equal("> "said2) ) 
and

PHP Code:
new said[6], 00
    read_argv
(1said5)
    
    if(
said[i] == '>')
    {
        
k++
        
k++
        
log_amx("> ! conditon 1 met k = %d"k)
    } 
    
    
    while (
said[k] == '!')
    {
        
i++
        
log_amx("> ! conditon 2 met ! found i = %d"i)
    }
    
    if (!
|| 3)
    {
        
log_amx("> ! conditon error met i = %d"i)
        return 
PLUGIN_CONTINUE
     
    

condition 2 is never met, it checks wrongs letters or i don't know what
code that does not work )=
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 04-10-2009 at 10:50.
Owyn is offline
Send a message via ICQ to Owyn
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-10-2009 , 11:13   Re: while i++ == containi[i] problem, i need to skip letters
Reply With Quote #26

*fixed my code, was wrong read_arg
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 04-13-2009 at 06:30.
Owyn is offline
Send a message via ICQ to Owyn
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode