errors (A lot) PLEASE HELP!!!
#1

I Saw here a bus interior and i decided to do a command for it
/buson -allowed to enter the bus
/busoff - unallowed to enter the bus

and i have a lot of errors:
pawn Код:
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(5) : error 001: expected token: ";", but found "new"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(95 -- 96) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(101) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(101) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(102) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(102) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(123) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(123) : error 017: undefined symbol "HornA"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(124) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(124) : error 017: undefined symbol "HornB"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(125) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(125) : error 017: undefined symbol "STime"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(127) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(127) : error 017: undefined symbol "HornA"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(129) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(129) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(130) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(130) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(137) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(137) : error 017: undefined symbol "HornB"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(139) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(139) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(140) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(140) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(147) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(147) : error 017: undefined symbol "STime"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(152) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(152) : error 004: function "OnPlayerKeyStateChange" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(154) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(154) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(155) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(155) : error 017: undefined symbol "newkeys"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(165) : warning 217: loose indentation
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(168) : warning 225: unreachable code
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(168) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(168) : error 004: function "OnPlayerCommandText" is not implemented

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.

I Dont have a power to give all lines so here is the system:

http://solidfiles.com/d/0Yq2]
http://solidfiles.com/d/0Yq2


tanks a lot for helpers
Reply
#2

*bump*
12 hours
Reply
#3

I guess that you forgot to close one } somwhere
Reply
#4

OK but now i have new errors:
pawn Код:
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(99 -- 100) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(105) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(105) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(106) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(106) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(127) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(127) : error 004: function "HornA" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(129) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(129) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(130) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(130) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(137) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(137) : error 004: function "HornB" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(139) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(139) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(140) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(140) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(147) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(147) : error 004: function "STime" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(152) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(152) : error 004: function "OnPlayerKeyStateChange" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(154) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(154) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(155) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(155) : error 017: undefined symbol "newkeys"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(165) : warning 217: loose indentation
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(168) : warning 225: unreachable code
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(168) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(168) : error 004: function "OnPlayerCommandText" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(170) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(182) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(186) : error 017: undefined symbol "COLOR_RED"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(187 -- 188) : error 033: array must be indexed (variable "AllowedEnterTheBus")
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(191) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(195) : error 017: undefined symbol "COLOR_RED"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(196 -- 197) : error 033: array must be indexed (variable "AllowedEnterTheBus")

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
lines:
pawn Код:
AllowedEnterTheBus = 0; // -->line 99
if (AllowedEnterTheBus = 0) return 0; // -->line 105
if (AllowedEnterTheBus = 1) // -->line 106
public HornA(playerid) // -->line 127
if (AllowedEnterTheBus = 0) return 0; // -->line 129
if (AllowedEnterTheBus = 1) // -->line 130
public HornB(playerid) // -->line 137
if (AllowedEnterTheBus = 0) return 0; // -->line 139
if (AllowedEnterTheBus = 1) // -->line 140
public STime(playerid) // -->line 147
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) // -->line 152
if (AllowedEnterTheBus = 0) return 0; // -->line 154
if (AllowedEnterTheBus = 1 && newkeys == 16 && IsInBus[playerid] > 0) // -->line 155
return 1; // -->line 165
public OnPlayerCommandText(playerid, cmdtext[]) // -->line 168
if (strcmp("/gotobus", cmdtext, true, 8) == 0) // -->line 170
if (strcmp("/allowedbus", cmdtext, true, 8) == 0) // -->line 182
SendClientMessageToAll(playerid, COLOR_RED, "You have able the option to enter the bus"); //-->line 186
AllowedEnterTheBus = 0 //--> line 187
 } //--> line 188
if (strcmp("/unallowedbus", cmdtext, true, 8) == 0) //--> line 191
SendClientMessageToAll(playerid, COLOR_RED, "You have disable the option to enter the bus"); //--> line 195
AllowedEnterTheBus = 0 //--> line 196
modify:
lined 186+195 has been fixed.new errors:

pawn Код:
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(189) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(194) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(198) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(199 -- 200) : error 033: array must be indexed (variable "AllowedEnterTheBus"

lines:
pawn Код:
SendClientMessageToAll(playerid, COLOR_RED, "You have able the option to enter the bus"); //--> line 189
if (strcmp("/unallowedbus", cmdtext, true, 8) == 0) //--> line 194
SendClientMessageToAll(playerid, COLOR_RED, "You have disable the option to enter the bus"); //--> line 198
AllowedEnterTheBus = 0
}//--> lines 199-200
please help me fix those errors
Reply
#5

line 189 and 198
SendClientMessageToAll doesn't need a playerid to send the message. since It sends the message to all players

line 199
It's AllowedEnterTheBus[playerid] I think. Can't bother too find it in that code

line 194
Do you have that under OnPlayerCommandText ?
Reply
#6

189+198 fixed
what do you mean in line 194?

modify
new errors:
pawn Код:
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(112) : error 010: invalid function or declaration
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(147) : error 001: expected token: ";", but found "}"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(156) : error 001: expected token: ";", but found "}"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(165) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(166) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(187) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(187) : error 004: function "HornA" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(189) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(190) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(197) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(197) : error 004: function "HornB" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(199) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(200) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(207) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(207) : error 004: function "STime" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(212) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(212) : error 004: function "OnPlayerKeyStateChange" is not implemented
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(214) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(215) : warning 211: possibly unintended assignment
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(215) : error 017: undefined symbol "newkeys"
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(225) : warning 217: loose indentation
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(227) : error 026: no matching "#if..."
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\Bus.pwn(228) : error 030: compound statement not closed at the end of file (started at line 199)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


14 Errors.
just tell me which errors can you fix and i will give you the lines
Reply
#7

Sorry, but do you even know what you're doing ?
Reply
#8

no so much why?
Reply
#9

Error spam :S
Sorry, I don't know how to help.
Reply
#10

Quote:
Originally Posted by speedruntrainer
Error spam :S
Sorry, I don't know how to help.
Then don't post
For 147 and 156 you forgot to add ';' one line before '}' (for example you have 'return 1' instead of 'return 1;'.

Function HornA means there is no such 'public HornA'. Same goes for HornB, and STime. OnPlayerKeyStateChange is default callback, so just add somewhere
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
 return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)