turning strcmp into cmd
#1

hi guys wondering if anyone can help me with this

i think i done most of it but i know im gona get an indentation error or an error from the strcmp side
here it is
http://pastebin.com/atZ2LkLL
will plus rep anyone who helps..


on the indentation note tho anyone know how to put it all back to the numbers i know tab moves it forward lol
Reply
#2

You get WARNINGS or Errors ?
Indenation is an WARNING.
Reply
#3

i think its the very bottom of the cmd:knockout and compiling now but i guess loose indentaion

EDIT:
loose indentation starts at
if(KnockedDown[playerid] == 1)

and i have
GetPlayerName(playerid, playername, sizeof(playername));
so idk what the problem is unless its just the indentation error..

oh and sorry get 4 errors

(10117) : warning 217: loose indentation
(10145) : error 017: undefined symbol "playername"
(10145) : error 017: undefined symbol "playername"
(10145) : error 029: invalid expression, assumed zero
(10145) : fatal error 107: too many error messages on one line

Compilation aborted

4 Errors.
Reply
#4

I don't usually help people here anymore this was really a miss click so I'm not posting the code.

Your problem however isn't your command conversion it's that you've either not defined "playername" which I'd assume would get the name of player who called the command.

It could also be that you want the name the name of the player you are targeting, you have this code here:

pawn Код:
new giveplayername[MAX_PLAYER_NAME];


                                        GetPlayerName(playerid, playername, sizeof(playername));
I'm going to assume you want the name of the player, going by that code, which can be resolved by adding the following line above GetPlayerName:

pawn Код:
new giveplayername[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];

                                        GetPlayerName(playerid, playername, sizeof(playername));
.

Note that haven't removed giveplayerame as you are using that else where in your code, so I recommend leaving it... which is why I assumed you wanted the players name who called the command.

EDIT: SHIFT + TAB moves code backwards.
Reply
#5

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
I don't usually help people here anymore this was really a miss click so I'm not posting the code.

Your problem however isn't your command conversion it's that you've either not defined "playername" which I'd assume would get the name of player who called the command.

It could also be that you want the name the name of the player you are targeting, you have this code here:

pawn Код:
new giveplayername[MAX_PLAYER_NAME];


                                        GetPlayerName(playerid, playername, sizeof(playername));
I'm going to assume you want the name of the player, going by that code, which can be resolved by adding the following line above GetPlayerName:

pawn Код:
new giveplayername[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];

                                        GetPlayerName(playerid, playername, sizeof(playername));
.

Note that haven't removed giveplayerame as you are using that else where in your code, so I recommend leaving it... which is why I assumed you wanted the players name who called the command.
fair enough bud, either way i really do appreciate it..
thank you very much got 1 error left and i did fix the first lot of errors then got a shed load of others lol but done them now i think

this is it lol and gona rep you all right now
(10149) : error 001: expected token: ";", but found "-identifier-"
format(string, sizeof(string), "* %s swings at %s and tries to knock him out.", sendername, giveplayername);

check it against the rest it looks fine to me but i am a newb
plus used #pragma tabsize 0 for loose indentation is that ok or stupid for commands?

what i have now from earlier with the one error
http://pastebin.com/yGEhh38J

edit: have i got to?

think i got it now lol cheers guys
Reply


Forum Jump:


Users browsing this thread: