Raised This Month: $ Target: $400
 0% 

[SOLVED] pcvars + set_task + floats = confused :S


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 09-04-2008 , 08:10   [SOLVED] pcvars + set_task + floats = confused :S
Reply With Quote #1

PHP Code:
new vip_advertisetime;

public 
plugin_init()
{
    
vip_advertisetime register_cvar("amx_advertisetime""10.0");
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1);
}

public 
fwHamPlayerSpawnPost(id)
{
    static 
Float:AdvertiseTime;
    
AdvertiseTime get_pcvar_float(vip_advertisetime);
    
    
advertise_vip(id)
    
set_task(get_pcvar_float(AdvertiseTime), "advertise_vip"id// <--- This is the line that gets the error
}

public 
client_disconnect(id)
{
    
remove_task(id)
}

public 
advertise(id)
{
    
client_print(idprint_chat"Hi"

This gives me a warning:
Quote:
C:\Users\Stu\Desktop\other\Stu's plugins\VIP.sma(71) : warning 213: tag mismatch
Ive never used floats before, and aparently i cant anyway xD
__________________

Last edited by minimiller; 09-04-2008 at 10:04.
minimiller is offline
Send a message via MSN to minimiller
 



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 03:07.


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