Raised This Month: $ Target: $400
 0% 

read_argv: Not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
burcyril10
Junior Member
Join Date: Feb 2005
Old 03-18-2005 , 03:22   read_argv: Not working
Reply With Quote #1

This is taken from my whole code
Code:
new rlvl //Declare the var read_argv(1,"rlvl",1) //Set its value do_wr(rlvl) //Pass it to my function

The function always gets 0, no matter what I type in console.....HELP!
burcyril10 is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-18-2005 , 04:56  
Reply With Quote #2

Code:
new rlvl[16] //Declare the string read_argv(1, rlvl, 15) //Set its value do_wr(rlvl) //Pass it to my function

Note that rlvl is a string and if you intend to receive it in do_wr that one has to take a string as a parameter, like this...

Code:
do_wr(thestring[]) { /* bla bla bla */ }
Johnny got his gun is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-18-2005 , 13:49  
Reply With Quote #3

Alternatively, keep the do_wr function the same and use this code:

Code:
new rlvl[16] //Declare the string read_argv(1, rlvl, 15) //Set its value do_wr(str_to_num(rlvl)) //Pass it to my function
__________________
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-18-2005 , 17:54  
Reply With Quote #4

I had acualy worked it out just before going to bed but thanks Avalanche cause i wasn't sure if you could do that so i used an intermediate variable
burcyril10 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 14:10.


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