FS variable conflict - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: FS variable conflict (
/showthread.php?tid=579350)
FS variable conflict -
hamzajaved780 - 26.06.2015
I am trying to use a fs on my server, it works perfectly when i use it with grandlrc but when i try to use it with my gm, It just stops working. Through debbugging i found that this line is causing the problem i even changed the variables but it didn't solve the problem.
Код:
F_ObjectInfo[fr_preview[playerid]][fr_id] = fr_preview[playerid];
It just dies on this line......
Re: FS variable conflict -
liquor - 26.06.2015
Wrong section.
But the variable is incorrect, if you created the variable like that it should've given you errors during compilation.
F_ObjectInfo
[fr_preview
[playerid
]][fr_id] = fr_preview[playerid];
You can never use an opening bracket twice like that in a variable., always close it before opening another one.
pawn Код:
// If your variable is created like this (changing MAX_... to whatever number you defined)
new F_ObjectInfo[MAX_fr_preview][MAX_PLAYERS][MAX_fr_id]
//Than this is the correct way of doing it, although it confuses me a bit since you didn't provide the belonging code, and might not actally work. But you can never put two [[ or ]], or [something[ etc...
F_ObjectInfo[fr_preview][playerid][fr_id] = fr_preview[playerid];
Re: FS variable conflict -
hamzajaved780 - 27.06.2015
Nope its like that
Код:
new F_ObjectInfo[MAX_fr_preview][MAX_fr_id]
new fr_preview[MAX_PLAYERS]
than this
Код:
F_ObjectInfo[fr_preview[playerid]][fr_id] = fr_preview[playerid];