Raised This Month: $ Target: $400
 0% 

Defining iPos


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 06-06-2006 , 23:23   Defining iPos
Reply With Quote #1

ookay, I'm tryin to put in a few motd in my menu.

I have this so far.

Code:
public DoHelp(id, key) {     if(get_cvar_num("sc_on") == 0)         return 1             new szMotd[1024]         if(key == 0)     {         iPos += format(szMotd[iPos], 1023-iPos, "<html></html>")     }     return 1 }

I keep getting a undefined symbol error. How are you supposed to do this.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
OneEyed
AMX Mod X Beta Tester
Join Date: Jun 2005
Old 06-06-2006 , 23:33  
Reply With Quote #2

Code:
new iPos;
__________________
OneEyed is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 06-06-2006 , 23:33  
Reply With Quote #3

Lawl.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 06-07-2006 , 00:47  
Reply With Quote #4

See what happens when you take someone else's code...you have no clue what is going on.

Who did you take it from? I can only think of three that really use that naming pattern.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 06-07-2006 , 14:31  
Reply With Quote #5

Yeah okay I didn't rip it from anyone.

I'm pretty it was OneEyed that told me to use something like this. In the IRC channel last night.

Hawk also helped, but he left aim, which was why I went into IRC for help.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 06-07-2006 , 15:28  
Reply With Quote #6

You should look at the compile error, unless your new, that is a easy error to fix, you shouldn't need help.
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 06-07-2006 , 15:44  
Reply With Quote #7

The only error was what was just answered. I know a nub question. but I wanted to make sure there wasn't some special way I had to do it.

My next question is why it doesn't show anything. I think its because I'm missing the show_motd ?
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-07-2006 , 16:20  
Reply With Quote #8

Yeah, lol. You also need to put some text there ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 06-07-2006 , 16:24  
Reply With Quote #9

Yeah. I just wanted to see if it would work.

show_motd(id, )

what do I put for "constant message")

Could I make several new szMotd[1024] and have them like 1,2,3,4,5,6,7 then use szMotd2 to show #2?
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-07-2006 , 16:30  
Reply With Quote #10

Use a multi-dimensional array:
Code:
public DoHelp(id, key) {     if(get_cvar_num("sc_on") == 0)         return 1             new szMotd[1024][3], iPos         switch(key)     {         case 0: iPos += format(szMotd[iPos][0], 1023-iPos, "<html></html>")         case 1: iPos += format(szMotd[iPos][1], 1023-iPos, "<html></html>")         case 2: iPos += format(szMotd[iPos][2], 1023-iPos, "<html></html>")     }     return 1 }
For the message you would put szMotd[key] or w/e
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 16:27.


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