Raised This Month: $ Target: $400
 0% 

Mismatch?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 11-03-2006 , 15:57   Mismatch?
Reply With Quote #1

I'm proabbly making a silly mistake, but why am i getting the compile error "Argument mismatch on line 1"
Code:
public set_phone_model(id,function) {         if(equali(function,"g_on")) { // Error is here                    //Model               }     else {         entity_set_string(id,EV_SZ_viewmodel,"")         entity_set_string(id,EV_SZ_weaponmodel,"")         entity_set_int(id,EV_INT_weaponanim,0)     }     return PLUGIN_HANDLED }
Drak is offline
Send a message via MSN to Drak
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 11-03-2006 , 16:04   Re: Mismatch?
Reply With Quote #2

in your public set_phone_model function is declare as a int. It need to be function[] to be a string. Since equal only take in strings
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Drak
Veteran Member
Join Date: Jul 2005
Old 11-03-2006 , 16:44   Re: Mismatch?
Reply With Quote #3

Then would i want todo something like:
Code:
if(equal(function,"1")
Since I just want to use 'set_phone_model(id,1)'
To set or remove the model
Drak is offline
Send a message via MSN to Drak
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 11-03-2006 , 17:29   Re: Mismatch?
Reply With Quote #4

if( function == 1 )
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
Drak
Veteran Member
Join Date: Jul 2005
Old 11-03-2006 , 19:54   Re: Mismatch?
Reply With Quote #5

Doh! Thanks.
Drak is offline
Send a message via MSN to Drak
Reply



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 04:47.


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