Pawno Compiler Crashing
#1

Hello,

I got the random spawns code of the wiki,
When i add it to my code, And try compile, It crashes my compiler,
Does anyone know why?
Reply
#2

Not when you don't post your code :P
Reply
#3

You forgot a bracket
Reply
#4

Its copied and pasted of the wiki,
Nothings changed:

https://sampwiki.blast.hk/wiki/Random
Reply
#5

Like I said, you forgot a bracket
Reply
#6

If i comment this then the compiler works,

pawn Код:
new rand = random(sizeof(ShipSpawns));
Reply
#7

The code on the wiki works fine with no crashes whatsoever.
You edited it and used the random() function outside of callbacks which caused the crash. You can't use functions outside callbacks
Reply
#8

What function?

All i have is the new rand thing below my includes,
Then the Float:ShipSpawns or w/e tht holds all the coords
Then in ongamemodeinit i use the random on addplayerclass
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)