Progress bar help!
#1

I've recently taken up trying to make a hunger / thirst bar.
But I can't make the include files to work.

https://sampforum.blast.hk/showthread.php?tid=113443

From here, I got the newest versions, the "progress2" ones, but after I #include <progress2>

I get these errors:

C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(15) : error 017: undefined symbol "INVALID_BAR_ID"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(33) : error 017: undefined symbol "CreateProgressBar"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(33) : warning 213: tag mismatch
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(35) : warning 217: loose indentation
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(47) : warning 217: loose indentation
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(51) : error 017: undefined symbol "DestroyProgressBar"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(52) : warning 217: loose indentation
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(57) : error 017: undefined symbol "SetProgressBarValue"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(5 : error 017: undefined symbol "UpdateProgressBar"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(59) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

Thank you for your help in advance.
Reply
#2

Open up the include, And add this on top and see how many actual errors you have and post them here

pawn Код:
#pragma tabsize 0
Reply
#3

C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(16) : error 017: undefined symbol "INVALID_BAR_ID"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(34) : error 017: undefined symbol "CreateProgressBar"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(34) : warning 213: tag mismatch
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(52) : error 017: undefined symbol "DestroyProgressBar"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(5 : error 017: undefined symbol "SetProgressBarValue"
C:\Users\User\Desktop\samp03z_svr_R1_win32\gamemod es\HungerScript.pwn(59) : error 017: undefined symbol "UpdateProgressBar"
Reply
#4

When you remove the progress bar include, Does it still show these errors? Are these errors in your script or in the include while compiling?

EDIT: Try compiling the include before using it.
Reply
#5

LINE 16: new Bar:Hunger[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
LINE 34: Hunger[playerid] = CreateProgressBar(549.00, 60.00, 57.50, 3.20, -16776961, 100.0);
LINE 34: -same as before-
LINE 52: DestroyProgressBar(Hunger[playerid]);
LINE 58: SetProgressBarValue(Hunger[playerid], Hungry[ playerid ] * 10.0);
LINE 59: UpdateProgressBar(Hunger[playerid], playerid);
Reply
#6

Compile the include and check for any errors in it before using it on the script.
Reply
#7

Include has no issues when compiling. I tried again, still getting error.s
Reply
#8

Quote:
Originally Posted by TheTerminator
Посмотреть сообщение
Include has no issues when compiling. I tried again, still getting error.s
Remove every code of the progress bar and compile please.
Reply
#9

If I remove each and every one of the codes then there won't be a problem.
Because there's no code to make a problem.
Reply
#10

The progress2 uses player textdraw.
You'll need to update your code to the new functions.

See https://github.com/Southclaw/progress2 for documentation.

Btw, you should consider indenting your code properly instead of telling the compiler to accept bad code(#pragma tabsize).
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)