Raised This Month: $ Target: $400
 0% 

Argument type mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 07-25-2008 , 14:05   Argument type mismatch
Reply With Quote #1

Hi
I have this :
PHP Code:
new lightcvar[4],First,Last;
    
get_pcvar_string(toggle_between,lightcvar,3);
    
strtok(lightcvar,First,2,Last,2,'&');
    new 
clight random_num(First,Last); 
And this cvar :
PHP Code:
toggle_between register_cvar("disco_between","c&x"); 
What is wrong ?
__________________

anakin_cstrike is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 07-25-2008 , 14:18   Re: Argument type mismatch
Reply With Quote #2

First and last must be arrays, because, according to strtok description,you need 1 more element for the terminating null. So First and Last must be First[2] and Last[2]
danielkza is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 07-25-2008 , 14:47   Re: Argument type mismatch
Reply With Quote #3

I've put like that for the first time, but the same result.
__________________

anakin_cstrike is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-25-2008 , 14:52   Re: Argument type mismatch
Reply With Quote #4

Try again because danielkza is right. ( but the random_num() line will be obviously wrong )
__________________

Last edited by Arkshine; 07-25-2008 at 18:28.
Arkshine is offline
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 05:33.


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