Posts: 1,167
Threads: 57
Joined: Jul 2010
Reputation:
0
Alright so, I need small advice how to read from this array
new Fruits[][512] = {
{"Fruits1","Tomato","Apple","Citron"},
{"Fruits2","Cherry","Mango","Orange"}
};
printf("%s are: %s %s %s",Fruits[0],....
printf("%s are: %s %s %s",Fruits[1],....
so how to read from Fruits array?
Posts: 1,167
Threads: 57
Joined: Jul 2010
Reputation:
0
But it will print Fruits1 and then only 1st chars from the rest
in console will be " Fruits1 are T A C " as its prints single character of Fruits[2],Fruits[3],..
Posts: 1,167
Threads: 57
Joined: Jul 2010
Reputation:
0
Fruits I took as example, I want to pick random RP question.
like
new Fruits[][512] = {
{"Fruits1","Tomato","Apple","Citron"},
{"Fruits2","Cherry","Mango","Orange"}
};
new r = random(sizeof(Fruits));
SendClientMessage(playerid,COLOR,Fruits[r][0]);//Question
SendClientMessage(playerid,COLOR,Fruits[r][1]);//Answer A
SendClientMessage(playerid,COLOR,Fruits[r][2]);//Answer B
SendClientMessage(playerid,COLOR,Fruits[r][3]);//Answer C
But only Fruits[r][0] works as need, rest its print as signle char
Posts: 1,167
Threads: 57
Joined: Jul 2010
Reputation:
0
Still doesnt help as I want that its also picks 3 answers of each question