AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Argument type mismatch (https://forums.alliedmods.net/showthread.php?t=74813)

anakin_cstrike 07-25-2008 14:05

Argument type mismatch
 
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 ?:|

danielkza 07-25-2008 14:18

Re: Argument type mismatch
 
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]

anakin_cstrike 07-25-2008 14:47

Re: Argument type mismatch
 
I've put like that for the first time, but the same result.

Arkshine 07-25-2008 14:52

Re: Argument type mismatch
 
Try again because danielkza is right. ( but the random_num() line will be obviously wrong )


All times are GMT -4. The time now is 05:33.

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