VC:MP 0.3 > mIRC/pawn Scripting

plzzz help me

(1/2) > >>

Spidey:
error is in this line
if else(strcmp(cmds,"forum",true) == 0) {


and 4 errors
C:\Documents and Settings\Administrator\My Documents\Vice city cops and robbers.pwn(72 -- 73) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\My Documents\Vice city cops and robbers.pwn(73) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Administrator\My Documents\Vice city cops and robbers.pwn(73) : error 001: expected token: "(", but found "else"
C:\Documents and Settings\Administrator\My Documents\Vice city cops and robbers.pwn(73) : error 017: undefined symbol "cmds"
C:\Documents and Settings\Administrator\My Documents\Vice city cops and robbers.pwn(73) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367         Copyright (c) 1997-2005, ITB CompuPhase


4 Errors.

plzzz help

NeskWriter:
Glad to see that you began scripting your own gamemode. Let's now talk on topic. If we think logically, "if else" doesn't seem to be the right grammar construction. What about "else if"? The second thing is an argument you tried to pass in strcmp. It is "cmd", not "cmds". You simply messed it, such thing happens to me many times. Hope you learn something new, PM me if you need some more help.

Spidey:

--- Quote from: NeskWriter on September 25, 2014, 05:25:51 pm ---Glad to see that you began scripting your own gamemode. Let's now talk on topic. If we think logically, "if else" doesn't seem to be the right grammar construction. What about "else if"? The second thing is an argument you tried to pass in strcmp. It is "cmd", not "cmds". You simply messed it, such thing happens to me many times. Hope you learn something new, PM me if you need some more help.



--- End quote ---

--- Quote from: NeskWriter on September 25, 2014, 05:25:51 pm ---Glad to see that you began scripting your own gamemode. Let's now talk on topic. If we think logically, "if else" doesn't seem to be the right grammar construction. What about "else if"? The second thing is an argument you tried to pass in strcmp. It is "cmd", not "cmds". You simply messed it, such thing happens to me many times. Hope you learn something new, PM me if you need some more help.



--- End quote ---
hey nesk i changed it but no changes

NeskWriter:
Damn I forgot that the parameter is "cmdtext"

else if(!strcmp(cmdtext, "forum", true))

Spidey:
hey no changes
Vice city cops and robbers.pwn(70) : warning 213: tag mismatch
Vice city cops and robbers.pwn(72 -- 73) : warning 215: expression has no effect
Vice city cops and robbers.pwn(73) : error 001: expected token: ";", but found "else"
Vice city cops and robbers.pwn(73) : error 029: invalid expression, assumed zero
Vice city cops and robbers.pwn(73) : warning 215: expression has no effect
Vice city cops and robbers.pwn(73) : error 001: expected token: ";", but found "if"
Vice city cops and robbers.pwn(73) : fatal error 107: too many error messages on one line

Navigation

[0] Message Index

[#] Next page

Go to full version