("") Errors Help
#1

PHP код:
KA-Roleplay\gamemodes\KARP.pwn(23873) : error 020invalid symbol name ""
KA-Roleplay\gamemodes\KARP.pwn(23890) : error 020invalid symbol name "" 
Код:
23873    for(new i = 0; i < sizeof MAX_FLARES; i++)
Код:
23890    for(new i = 0; i < sizeof MAX_FLARES; i++)
I have Some Errors Again
Reply
#2

Replace those loops with:

pawn Код:
for(new i = 0; i < MAX_FLARES; i++)
Reply
#3

pawn Код:
23873    for(new i = 0; i < sizeof(MAX_FLARES); i++)
23890    for(new i = 0; i < sizeof(MAX_FLARES); i++)
Here you go. The way you did it it sees it as "somerandombullshit" and not what you want it to be seen as 'cause you probably defined it as a string or something.
Reply
#4

Why you use sizeof if MAX_FLARES is a define? Will be replaced with the value by the compiler, just use Emmet code.

for(new i = 0; i < MAX_FLARES; i++)
Reply
#5

Sorry. sizeof(MAX_FLARES) is the way to use sizeof, not sizeof MAX_FLARES
You are both probably right.
Reply
#6

Quote:
Originally Posted by Berlovan
Посмотреть сообщение
Sorry. sizeof(MAX_FLARES) is the way to use sizeof, not sizeof MAX_FLARES
You are both probably right.
Wrong. sizeof is used to get the size of elements in a variable. MAX_FLARES is a define, NOT a variable, so using sizeof for a definition will produce an error.
Reply
#7

thanks for the help but im getting some more errors
Reply
#8

Quote:
Originally Posted by KeenanRitchie
Посмотреть сообщение
thanks for the help but im getting some more errors
Код:
23873    for(new i; i < MAX_FLARES; i++)
23890    for(new i; i < MAX_FLARES; i++)
"i" always start from 0 if you are not defined the "i" first.
Can you show the code and the error message?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)