Raised This Month: $ Target: $400
 0% 

Running functions with custon paramaters...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-06-2005 , 14:48   Running functions with custon paramaters...
Reply With Quote #1

Why wont this work? The function is executed with:
Code:
interactwithfakeciv(id , npcid[id])

and the function is loaded like this:
Code:
public interactwithfakeciv(id , npcid[id] ) {

npcid[id] is an global int.


I already fixed this by doing it a different way, but i would still like to know why this wouldn't work?
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-06-2005 , 16:27  
Reply With Quote #2

Code:
public interactwithfakeciv(id , npcid ) {
instead.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-06-2005 , 17:50  
Reply With Quote #3

you cant use arrays for function paramaters? dam.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-06-2005 , 18:17  
Reply With Quote #4

You can, but you assigned its required length as "id", which I don't believe was defined.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 02-06-2005 , 18:19  
Reply With Quote #5

You can; but they have to be static.

Since ids only range from 0-31, try
npcid[32]
instead (unless npcid is supposed to be a single id, in which case you'd use a normal variable...).
[edit] Damn you, beat me to it.
__________________
STEPS IN TROUBLESHOOTING <insert anything here>:
1. Narrow down the problem to a specific condition or conditions.
2. Fix it.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-06-2005 , 18:32  
Reply With Quote #6

ids range from 1-32.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-06-2005 , 20:52  
Reply With Quote #7

0 is the ID of the ded server console
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
BlueRaja
Senior Member
Join Date: Nov 2004
Old 02-06-2005 , 20:56  
Reply With Quote #8

Right, what did I say?
__________________
STEPS IN TROUBLESHOOTING <insert anything here>:
1. Narrow down the problem to a specific condition or conditions.
2. Fix it.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-06-2005 , 20:58  
Reply With Quote #9

Quote:
Originally Posted by XxAvalanchexX
ids range from 1-32.
Quote:
You can; but they have to be static.

Since ids only range from 0-31, try
npcid[32]
instead (unless npcid is supposed to be a single id, in which case you'd use a normal variable...).
[edit] Damn you, beat me to it.
ID's are 0-32, with 0 being dedicated server console, or taken up by metamod or its plugins if its listen.
__________________
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 02-06-2005 , 21:02  
Reply With Quote #10

Quote:
Originally Posted by BlueRaja
Right, what did I say?
0-31
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
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 19:25.


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