Switch the inputtext.
#1

pawn Код:
switch(inputtext)
                {
pawn Код:
C:\Users\X_Zerd\Desktop\Samp 0.3e\samp03e_svr_RC5_win32\gamemodes\O-RP.pwn(2343) : error 033: array must be indexed (variable "-unknown-")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

A switch statement is only for integers. inputtext is a string, therefore it cannot be used in a switch statement.
Click here to learn how to use them.
Reply
#3

pawn Код:
switch(inputtext[3])
                {
pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

"?"
Reply
#4

Check out this tutorial. It explains how to use switch statement for strings.
Reply
#5

Wow, cool tutorial Topaz, was not aware you could do this.
Reply
#6

Yep, That was unexpected, Thanks.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)