Weird error?
#1

Quote:
Originally Posted by [WSF]ThA_Devil
Посмотреть сообщение
EDIT:
This made no sense, but fixed it :/
ShipInfo[veh][ShipModel][i] = 1;
Thanks everybody involved!
Reply
#2

Try to put this in your enum:

pawn Код:
enum sNfo {
    ShipObject[64]
};
new ShipInfo[MAX_VEHICLES][sNfo];
Reply
#3

Quote:
Originally Posted by Elie1996
Посмотреть сообщение
Try to put this in your enum:

pawn Код:
enum sNfo {
    ShipObject[64]
};
new ShipInfo[MAX_VEHICLES][sNfo];
Not a single difference.
Reply
#4

pawn Код:
ShipInfo[veh][ShipObject[i]] = 1;
What is this "[i]".
Try to remove it.
Reply
#5

Quote:
Originally Posted by Elie1996
Посмотреть сообщение
pawn Код:
ShipInfo[veh][ShipObject[i]] = 1;
What is this "[i]".
Try to remove it.
Код:
"i" was used in loop, and veh was vehicle before then.
It seems you didn't read all of it, I require a loop for that.
Reply
#6

Yeah, sorry. Maybe you need to update. Check this out, it might help you ---> https://sampforum.blast.hk/showthread.php?tid=384518

Quote:

The script was real messy with OnFilterScriptInit and Exit everywhere and other stuff, but i wanna try it out

Reply
#7

Try changing:

pawn Код:
ShipInfo[veh][ShipObject[i]] = 1;
to

pawn Код:
ShipInfo[veh]ShipObject[i] = 1;
Reply
#8

Quote:
Originally Posted by Wizzy951
Посмотреть сообщение
Try changing:

pawn Код:
ShipInfo[veh][ShipObject[i]] = 1;
to

pawn Код:
ShipInfo[veh][ShipObject[i] = 1;
Sorry, but that's entirely wrong, you have to close as many brackets as you've opened.
Reply
#9

Quote:
Originally Posted by Wizzy951
Посмотреть сообщение
Try changing:

pawn Код:
ShipInfo[veh][ShipObject[i]] = 1;
to

pawn Код:
ShipInfo[veh][ShipObject[i] = 1;
So, you're opening a bracket, but you don't close it?

Green = Open | Red = Closed
ShipInfo[veh][ShipObject[i] = 1;

Anyway, that array doesn't make sense at all.

You're defining the array on this way:
pawn Код:
new ShipInfo[MAX_VEHICLES][sNfo];
enum sNfo {
    ShipObject[64]
}
Which means you can use it like this:
pawn Код:
ShipInfo[vehicleid][ShipObject] = "String with a max char of 64";
(Please correct me if I'm wrong.. I'm programming in four languages at this moment, I kinda get confused sometimes)
Reply
#10

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
Which means you can use it like this:
pawn Код:
ShipInfo[vehicleid][ShipObject] = "String with a max char of 64";
(Please correct me if I'm wrong.. I'm programming in four languages at this moment, I kinda get confused sometimes)
He is using it in a loop, so [i] stays for [playerid] and he doesn't have to remove it.
Also check the edit of my first response on your topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)