Raised This Month: $ Target: $400
 0% 

Argument type mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-23-2005 , 02:17   Argument type mismatch
Reply With Quote #1

Code:
register_cvar("amx_superjump",0) register_cvar("amx_kungfu",0)
huh? what ? it complains about argument two. I don't want to put it in quotes cause its not a string, I just want to get it using get_cvar_num("amx_superjump")
burcyril10 is offline
Jinto
Member
Join Date: Jun 2004
Location: Seattle, WA
Old 03-23-2005 , 02:42  
Reply With Quote #2

Put it in quotes doesn't matter if its not a string. get_cvar_num will return a number.
Jinto is offline
Send a message via ICQ to Jinto Send a message via AIM to Jinto Send a message via MSN to Jinto Send a message via Yahoo to Jinto
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-24-2005 , 19:18  
Reply With Quote #3

see, thats the problem, it would see that get_cvar_num() is NOT returning the correct number...
burcyril10 is offline
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-24-2005 , 19:39  
Reply With Quote #4

Ok did more debuging the number is correct, it does get the correct number BUT this doesn't work
Code:
powerup = ts_createpwup(TSPWUP_SUPERJUMP) ts_givepwup(id,powerup) client_print(id,print_chat,"[AMXX]Received free powerup")
All that i see is "[AMXX]Received free powerup" in chat so it os obviously going there but i never acualy get the powerup....yes, id = client
burcyril10 is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-24-2005 , 21:07  
Reply With Quote #5

Did you check to make sure it spawned the powerup?
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-24-2005 , 23:28  
Reply With Quote #6

Quote:
Originally Posted by amxmodx-source-1.0\dlls\ts\tsx\NBase.cpp
// create_pwup -> !wait! -> give_pwup
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-25-2005 , 00:49  
Reply With Quote #7

Ok, you two lost me....what ?!? I have no idea about what i mean 'spawning the powerup' all i know is that the target client never gets it.

What on earth does avalanches post mean?
burcyril10 is offline
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-25-2005 , 20:08  
Reply With Quote #8

*bump* I still don't have a clue...only been coding with amx for about 2 weeks, give me a break....
burcyril10 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-26-2005 , 01:39  
Reply With Quote #9

Let's translate:

// create_pwup -> !wait! -> give_pwup

This means:

Create the powerup then WAIT then give the powerup.

Use a set_task of 0.1 or so after creating it before you give it.

Code:
public wooh(id) {    new powerup = ts_createpwup(TSPWUP_SUPERJUMP)    new parms[2];    parms[0] = id;    parms[1] = powerup;    set_task(0.1,"give_the_pwup",id,parms,2); } public give_the_pwup(parms[]) {    ts_givepwup(parms[0],parms[1])    client_print(parms[0],print_chat,"[AMXX]Received free powerup") }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 09:52.


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