array must be indexed problem
#5

What is this supposed to do exactly?

pawn Код:
if(sscanf(params, "s", confirm) == "confirm")
Sscanf is used to save things to variables, and give out some text if the user inputs the wrong syntax... I can't make sense of why you'd want to compare it to confirm..

EDIT: I think what you're after is this sort of thing:

pawn Код:
if(sscanf(params, "s", confirm)) SendClientMessage(playerid, 0xFF00FFAA, "Usage: /command string");
That will save whatever the user types to "confirm" if it's a string. If the user failed to type anything, or gave an interger/Float, it will return the SendClientmessage.
Reply


Messages In This Thread
array must be indexed problem - by Danand - 08.04.2009, 22:16
Re: array must be indexed problem - by Castle - 08.04.2009, 22:25
Re: array must be indexed problem - by hanzen - 08.04.2009, 22:27
Re: array must be indexed problem - by Danand - 08.04.2009, 22:46
Re: array must be indexed problem - by Weirdosport - 08.04.2009, 23:21
Re: array must be indexed problem - by hanzen - 09.04.2009, 00:12
Re: array must be indexed problem - by 13th - 09.04.2009, 05:51

Forum Jump:


Users browsing this thread: 1 Guest(s)