Raised This Month: $ Target: $400
 0% 

Arrays


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DarlD
Senior Member
Join Date: Aug 2004
Old 12-25-2005 , 21:37   Arrays
Reply With Quote #1

I've been experimenting with arrays with hud messages.

i've created the hud messages:
Code:
#define MAXMESSAGES 4 new Messages[MAXMESSAGES] = {     "Hello",     "Welcome",     "Test1",     "Test2"; }

and i created a code for the text msgs:

Code:
public e_r_hud(id) { // e_r_hud is a ResetHUD event     new m_id = 1; 0 > m_id; m_id++ // this is supposed to change the message     set_hudmessage(200,100,0,-1.0,0.35,0,6.0,12.0)     show_hudmessage(id,"%s",Messages[m_id]) }

i get these errors when i compile:
Code:
error 001: expected token: "}", but found ";"
warning 215: expression has no effect
here is the hole script:

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plugin" #define VERSION "0.1" #define AUTHOR "Meta" #define MAXMESSAGES 4 new Messages[MAXMESSAGES] = {     "Hello",     "Welcome",     "Test1",     "Test2"; } public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("ResetHUD","e_r_hud","b") } public e_r_hud(id) {     new m_id = 1; 0 > m_id; m_id++     set_hudmessage(200,100,0,-1.0,0.35,0,6.0,12.0)     show_hudmessage(id,"%s",Messages[m_id]) }
__________________
DarlD is offline
Send a message via MSN to DarlD
 


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


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