[Risolto] Gambas class file
- Albottantotto
- Scoppiettante Seguace

- Messaggi: 376
- Iscrizione: giovedì 12 giugno 2008, 0:59
- Località: Civitavecchia
- Contatti:
[Risolto] Gambas class file
Cercando di avviare i file di esempio di Gambas2 mi dice:
Cannot load class 'nome del file': unalbe to load class file
Devo creare un file class?
Cannot load class 'nome del file': unalbe to load class file
Devo creare un file class?
Ultima modifica di Albottantotto il giovedì 4 settembre 2008, 21:53, modificato 1 volta in totale.
-
TheREAL1
Re: Gambas class file
se stai scrivendo in java si
ma non so che file stai creando... non puoi essere più preciso? (b2b)
- Albottantotto
- Scoppiettante Seguace

- Messaggi: 376
- Iscrizione: giovedì 12 giugno 2008, 0:59
- Località: Civitavecchia
- Contatti:
Re: Gambas class file
Io non sto scrivendo in niente :'D
E' un file di esempio già inserito in gambas2:')
Aprendo uno qualsiasi di questi esempi mi dice
'Questo progetto è di sola lettura'
Quindi penso che il problema sia li :'P
Riporto il codice di uno degli esempi
E' un file di esempio già inserito in gambas2:')
Aprendo uno qualsiasi di questi esempi mi dice
'Questo progetto è di sola lettura'
Quindi penso che il problema sia li :'P
Riporto il codice di uno degli esempi
Codice: Seleziona tutto
' Gambas module file
PUBLIC Screen AS NEW Window AS "Screen"
PUBLIC ciel AS Image
PUBLIC montagnes AS image
PUBLIC barriere AS image
PUBLIC sol1 AS image
PUBLIC sol2 AS image
PUBLIC sol3 AS image
PUBLIC nuage1 AS Image
PUBLIC nuage2 AS image
PUBLIC nuage3 AS image
PUBLIC nuage4 AS image
PUBLIC arbre AS image
PUBLIC fireworks AS image
PUBLIC scrolltext AS image
PUBLIC scroll AS Integer
PUBLIC scrollb AS Integer
PUBLIC scroll1 AS Integer
PUBLIC scroll2 AS Integer
PUBLIC scroll3 AS Integer
PUBLIC scroll4 AS Integer
PUBLIC scroll5 AS Integer
PUBLIC scroll5b AS Integer
PUBLIC scroll6 AS Integer
PUBLIC speed AS Integer
PUBLIC SUB Main()
WITH Screen
.Width = 640
.Height = 480
.Framerate = 100
.Show()
END WITH
music.Load("b-title.mod")
ciel = image.Load("bgd1_ciel.png")
nuage1 = image.Load("sprite_nuages1.png")
montagnes = image.Load("bgd2_montagnes.png")
sol1 = image.Load("bgd3_sol1.png")
sol2 = image.Load("bgd4_sol2.png")
sol3 = image.Load("bgd5_sol3.png")
nuage1 = image.Load("sprite_nuages1.png")
nuage2 = image.Load("sprite_nuages2.png")
nuage3 = image.Load("sprite_nuages3.png")
nuage4 = image.Load("sprite_nuages4.png")
barriere = image.Load("sprite_barriere.png")
arbre = image.Load("sprite_arbre.png")
fireworks = image.Load("fireworks.png")
scrolltext = image.Load("scrolltext.png")
speed = 2
scroll = 0
scrollb = 0
scroll1 = 0
scroll2 = 0
scroll3 = 0
scroll4 = 0
scroll5 = Rnd(0, 640)
scroll5b = Rnd(0, 640)
scroll6 = 0
music.Play(-1, 1)
END
PUBLIC SUB Screen_Draw()
Screen.Clear
scroll = scroll + speed
DEC (scroll1)
scroll2 = scroll2 - 2
scroll3 = scroll3 - 3
scroll4 = scroll4 - 4
scroll5 = scroll5 - 5
scroll5b = scroll5b - 2
scroll6 = scroll6 - 5
IF (scroll = 320) THEN speed = -2
IF (scroll = -960) THEN speed = 2
scrollb = scroll
IF (scrollb < - 640) THEN scrollb = - 640
IF (scrollb > 0) THEN scrollb = 0
IF (scroll1 = - 640) THEN scroll1 = 0
IF (scroll2 = - 640) THEN scroll2 = 0
IF (scroll3 < - 640) THEN scroll3 = scroll3 + 640
IF (scroll4 < - 640) THEN scroll4 = scroll4 + 640
IF (scroll5 < - 640) THEN scroll5 = scroll5 + 1280
IF (scroll5b < - 640) THEN scroll5b = scroll5b + 1280
IF (scroll6 < - 640) THEN scroll6 = scroll6 + 640
Draw.Image(ciel, 0, 0)
Draw.Image(montagnes, scroll1, 200)
Draw.Image(montagnes, scroll1 + 640, 200)
Draw.Image(sol1, scroll2, 420)
Draw.Image(sol1, scroll2 + 640, 420)
Draw.Image(sol2, scroll3, 430)
Draw.Image(sol2, scroll3 + 640, 430)
Draw.Image(sol3, scroll4, 450)
Draw.Image(sol3, scroll4 + 640, 450)
Draw.Image(nuage1, scroll6, 0)
Draw.Image(nuage1, scroll6 + 640, 0)
Draw.Image(nuage2, scroll4, 82)
Draw.Image(nuage2, scroll4 + 640, 82)
Draw.Image(nuage3, scroll3, 120)
Draw.Image(nuage3, scroll3 + 640, 120)
Draw.Image(nuage4, scroll2, 138)
Draw.Image(nuage4, scroll2 + 640, 138)
Draw.Image(barriere, scroll5, 440)
Draw.Image(arbre, scroll5b, 140)
Draw.Image(fireworks, scrollb, 0)
Draw.Image(scrolltext, scrollb + 640, 0)
END
PUBLIC SUB Screen_Close()
Music.Stop()
END
PUBLIC SUB Screen_KeyPressed()
IF (key.Code = key.F1) THEN Screen.FullScreen = NOT Screen.FullScreen
IF (key.Code = key.Esc) THEN Screen.Close()
END
- Pixel
- Imperturbabile Insigne

- Messaggi: 2719
- Iscrizione: lunedì 29 maggio 2006, 14:24
- Sesso: Maschile
- Località: Forlimpopoli
Re: Gambas class file
Dopo che hai aperto il file di esempio salvalo sulla tua home, quindi avvialo pure.
Il problema risiede semplicemente sul fatto che gli esempi sono in una zona del sistema non accessibile da utente normale e quando il sistema cerca di creare dei file temporanei ti ritrovi l'errore.
Inoltre, se hai installato gambas2 dai repository ufficiali di Ubuntu è probabile (molto ma molto probabile) che alcuni esempi non ti funzionino a causa di alcuni difettucci dei file deb.
Ciao
Il problema risiede semplicemente sul fatto che gli esempi sono in una zona del sistema non accessibile da utente normale e quando il sistema cerca di creare dei file temporanei ti ritrovi l'errore.
Inoltre, se hai installato gambas2 dai repository ufficiali di Ubuntu è probabile (molto ma molto probabile) che alcuni esempi non ti funzionino a causa di alcuni difettucci dei file deb.
Ciao
Ubuntu User 4683 Comunità Italiana Gambas
Non chiedetevi cosa Ubuntu-it può fare per voi ma chiedetevi cosa potete fare voi per Ubuntu-it
Non chiedetevi cosa Ubuntu-it può fare per voi ma chiedetevi cosa potete fare voi per Ubuntu-it
- Albottantotto
- Scoppiettante Seguace

- Messaggi: 376
- Iscrizione: giovedì 12 giugno 2008, 0:59
- Località: Civitavecchia
- Contatti:
Chi c’è in linea
Visualizzano questa sezione: 0 utenti iscritti e 5 ospiti