Raised This Month: $32 Target: $400
 8% 

Argument type Mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-10-2017 , 07:21   Argument type Mismatch
Reply With Quote #1

Hello, i got this

PHP Code:
stock get_date(daysstring[], chars) {
    
    new 
ymd
    date
(y,d// line <19882>
    
    
d+=days
    
    
new go true
    
while(go) {
        switch(
m) {
            case 
1,357810: {
                if(
d>31) { d=d-31m++; }
                else 
go false
            
}
            case 
2: {
                if(
d>28) { d=d-28m++; }
                else 
go false
            
}
            case 
46911: {
                if(
d>30) { d=d-30m++; }
                else 
go false
            
}
            case 
12: {
                if(
d>31) { d=d-31y++; m=1; } // line <19902>
                
else go false
            
}
        }
    }
    
formatex(stringchars"m%dd%dy%d"m,y)
//  line <19908> 
i get Error: Argument type mismatch <argument 1> ... on line <19882>

i get Error: must be a value <non-constant> ... on line <19902>

i get Warning: expression has no effect... on line <19902>

and also get Warning: symbol is never used "y"... ... on line <19908>

Wth ?
__________________

Last edited by ghost95v; 09-10-2017 at 07:24.
ghost95v is offline
Send a message via Skype™ to ghost95v
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-10-2017 , 07:27   Re: Argument type Mismatch
Reply With Quote #2

Show full code.
__________________
HamletEagle is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-13-2017 , 16:38   Re: Argument type Mismatch
Reply With Quote #3

I don't get any errors when compiling that. Your error is elsewhere.
What HamletEagle said.

This line replaces the complete function though:
format_time(output, charsmax(output), "m%md%dy%Y", get_systime() + days * 86400);

Last edited by Black Rose; 09-13-2017 at 16:38.
Black Rose is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-18-2017 , 13:49   Re: Argument type Mismatch
Reply With Quote #4

Yes ,the error comes from some other codes that collies with this... but np , Solved, thank you anyway
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
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 22:09.


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