Raised This Month: $ Target: $400
 0% 

Stock problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-22-2013 , 12:27   Stock problem
Reply With Quote #1

Hi
This is first stock i try to do so dont put a gun in my head please

PHP Code:
public set_age(idlevelcid)
{
    if(!
cmd_access(idlevelcid4))
        return

    new 
age_day[3], age_month[3], age_year[5]
    
read_argv(1age_day2)
    
read_argv(2age_month2)
    
read_argv(3age_year4)
    
    
str_to_num(age_day)
    
str_to_num(age_month)
    
str_to_num(age_year)
    
    
set_user_age(idage_yearage_monthage_day)
}

stock set_user_age(idage_yearage_monthage_day)
{
    new 
today_year[5], today_month[3], today_day[3]
    
get_time("%Y"today_year4)
    
get_time("%m"today_month2)
    
get_time("%d"today_day2)
    
    if(
today_year age_year)
        return
    
    
age[id] = today_year age_year
    
    
if(today_month <= age_month)
    {
        if(
today_month == age_month && today_day age_day || today_month age_month)
            
age[id] -= 1
    
}
    
    if(
today_month == age_month && today_day == age_day)
        
in_birthday[id] = true

well i have no idea what is the problem

Errors:
Code:
Error: Argument type mismatch (argument 2) on line 66
Error: Array must be indexed (variable "today_year") on line 76
Error: Array must be indexed (variable "today_year") on line 79
Error: Array must be indexed (variable "today_month") on line 81
Error: Array must be indexed (variable "today_month") on line 83
Error: Array must be indexed (variable "today_month") on line 87
If i delete function set_age, the stock doesnt gets any error.
__________________
Jhob94 is online now
 



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 18:57.


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