AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]Array stuffs (https://forums.alliedmods.net/showthread.php?t=63192)

Alka 11-14-2007 15:00

[SOLVED]Array stuffs
 
Huh,shame to post here (:D) but what the hell, i have spent hours to get the problem but nothing. The structure in file is like this:
Code:

What the hell is erath? ;A shit
What is a retard? ;A dumb kid without a brain.

:)
1st is the question then is the answer, loading is maded correctly
Code:

client_print(0, print_chat, "Answer : %s", CurrentAnswer);
, this is debug and the answer is correct, then i store the answer to a global and check for it in "say args" but is NOT WORKING. I type the correct answer but is not showing nothing (
Code:

client_print(0, print_chat, "Correct Answer");
). :S

The oddest thing is that is working only for last line from file. E.g
Code:

What is a retard? ;A dumb kid without a life
if i type "A dumb kid without a life" is working :S

Thanks.

[ --<-@ ] Black Rose 11-14-2007 15:09

Re: Array stuffs
 
"you wined"
Seriously?

Code:
for(new i = 0 ; i < Num ; i++) {     client_print(0, print_chat, "Answer : %s", CurrentAnswer); }
I assume that's wrong. Or debugging purpose, since I noticed it gave the answer when the question was shown...

Alka 11-15-2007 09:49

Re: [SOLVED]Array stuffs
 
huh, "you gained" what ever. I know i should put the client_print outside of the loop, but the prupose of it was to show if the current answer is the same from file. Thanks anyway , problem solved, i trimed the lines from files and worked o_O.

[ --<-@ ] Black Rose 11-15-2007 13:48

Re: [SOLVED]Array stuffs
 
I would say "you won".

Good.

Alka 11-15-2007 14:02

Re: [SOLVED]Array stuffs
 
Huh, yeah, your right! Nvm... :)


All times are GMT -4. The time now is 01:18.

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